Jump to content

WM MOVE

From EDM2

This message occurs when a window with style CS_MOVENOTIFY changes its absolute position.

Syntax

param1
    ULONG   ulReserved; /* Reserved value, should be 0. */

param2
    ULONG   ulReserved; /* Reserved value, should be 0. */

Parameters

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

Returns

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

Remarks

The message is sent from WinSetWindowPos, WinSetMultWindowPos, and WinScrollWindow.

The message is sent to any window when it is moved relative to its parent window. In addition, a WM_MOVE message is also sent to any children of that window that have style CS_MOVENOTIFY.

The new position of the window is obtained by calling WinQueryWindowRect, and can make those rectangle coordinates relative to any window by calling WinMapWindowPoints.

Note: There are several instances where windows have cause to know if they have been moved, and these include the occasions when the window does not change position relative to its parent, but does change position relative to the screen (its absolute position).

An example is menus. When a top-level menu control (child of the frame window) moves its absolute position as a result of the frame window being moved, the top-level menu control causes the movement of any pull-down menus along with its movement. The same applies to application/dialog box positional grouping. In some instances, a dialog box might cause to be moved as the main window is moved, to make room for other applications.

Default Processing

The default window procedure takes no action on this message, other than to set ulReserved to 0.