Reputation: 995
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.
Upvotes: 1
Views: 2006
Reputation: 2184
A window must have the WS_THICKFRAME
or WS_CAPTION
style to receive WM_GETMINMAXINFO
.
This is basically all you need to know.
Upvotes: 0
Reputation: 10560
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.
Upvotes: 2
Reputation: 76001
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.
Upvotes: 2