WM_GETMINMAXINFO

2.x

WM_GETMINMAXINFO
lpmmi = (MINMAXINFO FAR*) lParam; /* address of structure */

The WM_GETMINMAXINFO message is sent to a window whenever Windows needs the maximized position or dimensions of the window or needs the maximum or minimum tracking size of the window. The maximized size of a window is the size of the window when its borders are fully extended. The maximum tracking size of a window is the largest window size that can be achieved by using the borders to size the window. The minimum tracking size of a window is the smallest window size that can be achieved by using the borders to size the window.

Windows fills in a MINMAXINFO data structure, specifying default values for the various positions and dimensions. The application may change these values if it processes this message.

Parameters

lpmmi

Value of lParam. Points to a MINMAXINFO data structure. The MINMAXINFO structure has the following form:

typedef struct tagMINMAXINFO {  /* mmi */
    POINT ptReserved;
    POINT ptMaxSize;
    POINT ptMaxPosition;
    POINT ptMinTrackSize;
    POINT ptMaxTrackSize;
} MINMAXINFO;

Return Value

An application should return zero if it processes this message.

Example

This example processes a WM_GETMINMAXINFO message and sets the minimum tracking width of the window to 200 and the minimum tracking height of the window to 500:

MINMAXINFO FAR* lpmmi;

case WM_GETMINMAXINFO:
    lpmmi = (MINMAXINFO FAR*) lParam;
    lpmmi->ptMinTrackSize.x = 200;
    lpmmi->ptMinTrackSize.y = 500;

    break;