Just tried some small graphics application of mine on Windows 7, and I'm getting a WM_SIZE event with loword==hiword== -1 -- can this be safely ignored, or does it have some special meaning? I never saw such sizes on XP/Vista, only with Windows 7. The docs don't tell much about what hiword/loword can be, so I wonder if -1 has some special meaning. (Should I check for negative in general, or is -1 the only case?)
+1
A:
what is in the wParam ? the lParam should contain the size of the client area of the window, but the wParam shows what type of resizing happened: minimized, maximized, ...
i seem to remember that, if the window is minimized, the client area has no size, thus the strange values in WM_SIZE. idem for values returned by GetWindowPos() or GetWindowPlacement().
Adrien Plisson
2009-10-25 10:12:17