Export (0) Print
Expand All

WM_SIZE message

Sent to a window after its size has changed.

A window receives this message through its WindowProc function.


#define WM_SIZE                         0x0005

Parameters

wParam

The type of resizing requested. This parameter can be one of the following values.

ValueMeaning
SIZE_MAXHIDE
4

Message is sent to all pop-up windows when some other window is maximized.

SIZE_MAXIMIZED
2

The window has been maximized.

SIZE_MAXSHOW
3

Message is sent to all pop-up windows when some other window has been restored to its former size.

SIZE_MINIMIZED
1

The window has been minimized.

SIZE_RESTORED
0

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

Type: LRESULT

If an application processes this message, it should return zero.

Remarks

If the SetScrollPos or 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
HIWORD
LOWORD
MoveWindow
Conceptual
Windows
Other Resources
SetScrollPos

 

 

Community Additions

ADD
Show:
© 2014 Microsoft