Jump to content

WM WINDOWPOSCHANGED: Difference between revisions

From EDM2
Created page with "If this message has any of the values of the '''fl''' parameter of the SWP structure set, with the exception of the SWP_NOADJUST and SWP_NOREDRAW values, it is sent to the window procedure of the window whose position is changed. This message is also sent if the return value from the WM_ADJUSTWINDOWPOS is not NULL. ==Syntax== <PRE> param1 PSWP pswp; SWP structures.: param2 ULONG flAwp; Adjust window position status indicators.: </PRE> ==..."
 
No edit summary
 
Line 11: Line 11:


==Parameters==
==Parameters==
;pswp ([[PSWP]]) - Input
;pswp (P[[SWP]]) - Input
: This points to two [[SWP]] structures. The first [[SWP]] structure describes the entire new window state, whereas the second structure describes the entire old window state. The '''fl''' parameter of the first structure contains only those indicators corresponding to the state changes that occurred.
: This points to two [[SWP]] structures. The first [[SWP]] structure describes the entire new window state, whereas the second structure describes the entire old window state. The '''fl''' parameter of the first structure contains only those indicators corresponding to the state changes that occurred.
;flAwp ([[ULONG]]) - Input
;flAwp ([[ULONG]]) - Input

Latest revision as of 22:31, 13 April 2025

If this message has any of the values of the fl parameter of the SWP structure set, with the exception of the SWP_NOADJUST and SWP_NOREDRAW values, it is sent to the window procedure of the window whose position is changed. This message is also sent if the return value from the WM_ADJUSTWINDOWPOS is not NULL.

Syntax

param1
    PSWP    pswp;  /* SWP structures. */

param2
    ULONG   flAwp; /* Adjust window position status indicators. */

Parameters

pswp (PSWP) - Input
This points to two SWP structures. The first SWP structure describes the entire new window state, whereas the second structure describes the entire old window state. The fl parameter of the first structure contains only those indicators corresponding to the state changes that occurred.
flAwp (ULONG) - Input
Adjust window position status indicators. The AWF_* flags specify the state change of the frame window. The return value from the WM_ADJUSTWINDOWPOS message:
0
The SWP_NOADJUST option has been specified.
Other
Adjust window position status indicators.

Returns

ulReserved (ULONG) - returns
Reserved value, should be 0.

Remarks

The system sends this message after the window's size, position, or z-order has changed.

Default Processing

The default window procedure sets ulReserved to 0 and sends the following messages, based on the values of the fl parameter of the first SWP data structure:

  • SWP_SIZE: A WM_SIZE with the new window size from the first SWP structure.
  • SWP_HIDE: A WM_SHOW to hide the new window.
  • SWP_SHOW: A WM_SHOW to show the new window.

Examples

This example processes the WM_WINDOWPOSCHANGED message and assigns the two structures to pointers.

PSWP pswpNew, pswpOld;

case WM_WINDOWPOSCHANGED:
    pswpNew = PVOIDFROMMP(mp1);
    pswpOld = pswpNew + 1;