The WM_SIZE message is sent to a window after its size has changed.
A window receives this message through its WindowProc function.
Syntax WM_SIZE
WPARAM wParam
LPARAM lParam
Parameters
- wParam Specifies the type of resizing requested. This parameter can be one of the following values.
- 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.
- lParam The low-order word of lParam specifies the new width of the client area.
The high-order word of lParam specifies the new height of the client area.
Return Value
If an application processes this message, it should return zero.
RemarksIf the
programming:windows:SetScrollPos or
programming - windows - MoveWindow function is called for a child window as a result of the WM_SIZE message, the bRedraw or bRepaint parameter should be nonzero to cause the window to be repainted.
Although the width and height of a window are 32-bit values, the lParam parameter contains only the low-order 16 bits of each.
Notification Requirements
- Minimum DLL Version None
- Header Declared in Winuser.h, include Windows.h
- Minimum operating systems Windows 95, Windows NT 3.1
Prototype for Message Handlervoid on_size(HWND hwnd, UINT state, int cx, int cy)
{
}
From:
MSDN