Fixed the resize bug.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2717 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
icemank 2003-07-14 14:40:51 +00:00
parent c846858de2
commit d149bd7fcd

View file

@ -540,17 +540,19 @@ BOOL CALLBACK DialogResize(HWND hWnd, LPARAM /* unused */)
GetWindowRect(hWnd, &r); GetWindowRect(hWnd, &r);
ScreenToClient(g_sdata.hwnd, (LPPOINT)&r); ScreenToClient(g_sdata.hwnd, (LPPOINT)&r);
ScreenToClient(g_sdata.hwnd, ((LPPOINT)&r)+1); ScreenToClient(g_sdata.hwnd, ((LPPOINT)&r)+1);
switch (GetDlgCtrlID(hWnd)) { if(hWnd != g_toolbar.hwnd) {
case IDC_LOGWIN: switch (GetDlgCtrlID(hWnd)) {
SetWindowPos(hWnd, 0, r.left, r.top,r.right - r.left + g_resize.dx, r.bottom - r.top + g_resize.dy, SWP_NOZORDER|SWP_NOMOVE); case IDC_LOGWIN:
break; SetWindowPos(hWnd, 0, r.left, r.top,r.right - r.left + g_resize.dx, r.bottom - r.top + g_resize.dy, SWP_NOZORDER|SWP_NOMOVE);
case IDC_TEST: break;
case IDC_CLOSE: case IDC_TEST:
SetWindowPos(hWnd, 0, r.left + g_resize.dx, r.top + g_resize.dy, 0, 0, SWP_NOZORDER|SWP_NOSIZE); case IDC_CLOSE:
break; SetWindowPos(hWnd, 0, r.left + g_resize.dx, r.top + g_resize.dy, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
default: break;
SetWindowPos(hWnd, 0, r.left, r.top + g_resize.dy, r.right - r.left + g_resize.dx, r.bottom - r.top, SWP_NOZORDER); default:
break; SetWindowPos(hWnd, 0, r.left, r.top + g_resize.dy, r.right - r.left + g_resize.dx, r.bottom - r.top, SWP_NOZORDER);
break;
}
} }
RedrawWindow(hWnd,NULL,NULL,RDW_INVALIDATE); RedrawWindow(hWnd,NULL,NULL,RDW_INVALIDATE);
return TRUE; return TRUE;