mirror of
https://github.com/isledecomp/LEGOIslandRebuilder.git
synced 2025-02-19 19:07:02 -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) {
|
switch (message) {
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
|
{
|
||||||
UINT width = LOWORD(lParam);
|
UINT width = LOWORD(lParam);
|
||||||
UINT height = HIWORD(lParam);
|
UINT height = HIWORD(lParam);
|
||||||
|
|
||||||
LayoutObjects(width, height);
|
LayoutObjects(width, height);
|
||||||
break;
|
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);
|
return super::WindowProc(message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue