From 5fa67b54f84c139035e4712f8bc04bfd0588bc47 Mon Sep 17 00:00:00 2001 From: Sylae Jiendra Corell Date: Fri, 1 Aug 2014 10:41:11 -0600 Subject: [PATCH] Specify which max() to use in dlogtool --- Win32/charedit/dlogtool.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Win32/charedit/dlogtool.cpp b/Win32/charedit/dlogtool.cpp index b4254d99..72f07838 100644 --- a/Win32/charedit/dlogtool.cpp +++ b/Win32/charedit/dlogtool.cpp @@ -1,4 +1,5 @@ #include +#include #define ND 15 #define NI 500 @@ -471,20 +472,20 @@ BOOL CALLBACK dummy_dialog_proc(HWND hDlg, UINT message, WPARAM, LPARAM) edit_box = CreateWindow("edit",NULL,WS_CHILD | WS_BORDER | WS_VISIBLE, item_rect[free_item].left,item_rect[free_item].top, item_rect[free_item].right - item_rect[free_item].left, - max(22,item_rect[free_item].bottom - item_rect[free_item].top), + std::max(22,item_rect[free_item].bottom - item_rect[free_item].top), dlgs[free_slot],(HMENU) 150,store_hInstance,NULL); store_edit_parent = dlgs[free_slot]; old_edit_proc = (WNDPROC) GetWindowLong(edit_box,GWL_WNDPROC); SetWindowLong(edit_box,GWL_WNDPROC,(LONG) edit_proc); break; } - win_height = max(win_height, item_rect[free_item].bottom + 35); - win_width = max(win_width, item_rect[free_item].right + 11); - } - } - - /*win_height += 8; - win_width += 3;*/ + win_height = std::max(win_height, item_rect[free_item].bottom + 35); + win_width = std::max(win_width, item_rect[free_item].right + 11); + } + } + + /*win_height += 8; + win_width += 3;*/ MoveWindow(dlgs[free_slot],0,0,win_width,win_height,false); EndDialog(hDlg, 0);