Export (0) Print
Expand All
1 out of 5 rated this helpful - Rate this topic

WM_WINDOWPOSCHANGING message

Sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function.

A window receives this message through its WindowProc function.


#define WM_WINDOWPOSCHANGING            0x0046

Parameters

wParam

This parameter is not used.

lParam

A pointer to a WINDOWPOS structure that contains information about the window's new size and position.

Return value

Type: LRESULT

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

Remarks

For a window with the WS_OVERLAPPED or WS_THICKFRAME style, the DefWindowProc function sends the WM_GETMINMAXINFO message to the window. This is done to validate the new size and position of the window and to enforce the CS_BYTEALIGNCLIENT and CS_BYTEALIGNWINDOW client styles. By not passing the WM_WINDOWPOSCHANGING message to the DefWindowProc function, an application can override these defaults.

While this message is being processed, modifying any of the values in WINDOWPOS affects the window's new size, position, or place in the Z order. An application can prevent changes to the window by setting or clearing the appropriate bits in the flags member of WINDOWPOS.

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
DefWindowProc
EndDeferWindowPos
SetWindowPos
WINDOWPOS
WM_GETMINMAXINFO
WM_MOVE
WM_SIZE
WM_WINDOWPOSCHANGED
Conceptual
Windows

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.