win32: save the "not maximized" window size

also fix the window start up position

see http://pulkomandy.tk/projects/GrafX2/ticket/102
This commit is contained in:
Thomas Bernard
2019-05-21 20:45:21 +02:00
parent 31d3719f26
commit 2d645edbc0
8 changed files with 99 additions and 40 deletions

View File

@@ -168,10 +168,16 @@ static LRESULT CALLBACK Win32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
break;
case WM_SIZE:
GFX2_Log(GFX2_DEBUG, "WM_SIZE : %dx%d type=%d\n", LOWORD(lParam), HIWORD(lParam), wParam);
if (wParam != SIZE_MINIMIZED)
if (wParam == SIZE_MINIMIZED)
Window_state = GFX2_WINDOW_MINIMIZED;
else
{
Resize_width = LOWORD(lParam);
Resize_height = HIWORD(lParam);
if (wParam == SIZE_MAXIMIZED)
Window_state = GFX2_WINDOW_MAXIMIZED;
else if (wParam == SIZE_RESTORED)
Window_state = GFX2_WINDOW_STANDARD;
}
return 0;
case WM_CLOSE: