add minimum size to window

This commit is contained in:
itsmattkc 2021-09-12 22:47:11 -07:00
parent 0b110eb8a6
commit 6492af66f9

View file

@ -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);
}