mirror of
https://github.com/isledecomp/LEGOIslandRebuilder.git
synced 2024-11-27 09:35:41 -05:00
add minimum size to window
This commit is contained in:
parent
0b110eb8a6
commit
6492af66f9
1 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue