This topic is now archived and is closed to further replies.


WM_"The window has been resized"

Recommended Posts

The WM_SIZE message is sent to a window after its size has changed.

fwSizeType = wParam; // resizing flag
nWidth = LOWORD(lParam); // width of client area
nHeight = HIWORD(lParam); // height of client area

Value of wParam. Specifies the type of resizing requested. This parameter can be one of the following values: Value Meaning
SIZE_MAXHIDE Message is sent to all pop-up windows when some other window is maximized.
SIZE_MAXIMIZED The window has been maximized.
SIZE_MAXSHOW Message is sent to all pop-up windows when some other window has been restored to its former size.
SIZE_MINIMIZED The window has been minimized.
SIZE_RESTORED The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.

Value of the low-order word of lParam. Specifies the new width of the client area.
Value of the high-order word of lParam. Specifies the new height of the client area.
Return Values
If an application processes this message, it should return zero.

If the SetScrollPos or MoveWindow function is called for a child window as a result of the WM_SIZE message, the bRedraw parameter should be nonzero to cause the window to be repainted.

Although the width and height of a window are 32-bit values, the nWidth and nHeight parameters of the WM_SIZE message contain only the low-order 16 bits.

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.


Share this post

Link to post
Share on other sites