diff --git a/src/window.cpp b/src/window.cpp index c72b3ae..3ea082a 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -60,12 +60,26 @@ LRESULT CRebuilderWindow::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_SIZE: + { UINT width = LOWORD(lParam); UINT height = HIWORD(lParam); LayoutObjects(width, height); break; } + case WM_GETMINMAXINFO: + { + static const LONG minimumWindowWidth = 160; + static const LONG minimumWindowHeight = 160; + + MINMAXINFO *minmaxInfo = (MINMAXINFO*)lParam; + + minmaxInfo->ptMinTrackSize.x = minimumWindowWidth; + minmaxInfo->ptMinTrackSize.y = minimumWindowHeight; + + return 0; + } + } return super::WindowProc(message, wParam, lParam); }