tags:

views:

437

answers:

2

In handling a WM_GETMINMAXINFO message, I attempt to alter the parameter MINMAXINFO structure by changing the ptMaxSize. It doesn't seem to have any effect. When I receive the WM_SIZE message, I always get the same value, no matter whether I increase or decrease the ptMaxSize in the WM_GETMINMAXINFO.

+1  A: 

Are you sure your window is maximized? As per http://msdn.microsoft.com/en-us/library/ms632605(VS.85).aspx, MINMAXINFO::ptMaxSize controls the maximum size of the window wen maximized.

If you want to control the maximum tracking size of your window (the maximum size when the window is normal), you need to modify MINMAXINFO::ptMaxTrackSize.

Franci Penov
Yes.. definitely maximized. I'm getting the maximized (2) value in the wparam in the WM_SIZE message. The lparam doesn't change, no matter what I do to the ptMaxZSize in the WM_GETMINMAXINFO message handling. I'm maximizing by clicking the maximize button on my app's window.
Steve
A: 

Make sure you are handling the WM_GETMINMAXINFO message in the window procedure of the main application.

The message only makes sense when handled by the main frame window and will have no effect if the message is handled by one of the child window procedures.

jussij
I confirmed that I am handling it in the main frame window. Thanks.
Steve