Steve
Steve

Reputation: 995

WM_GETMINMAXINFO, the ptMaxSize not having any effect

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

Answers (3)

metablaster
metablaster

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

jussij
jussij

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

Franci Penov
Franci Penov

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

Related Questions