Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WM_MOVE message

Sent after a window has been moved.

A window receives this message through its WindowProc function.


#define WM_MOVE                         0x0003

Parameters

wParam

This parameter is not used.

lParam

The x and y coordinates of the upper-left corner of the client area of the window. The low-order word contains the x-coordinate while the high-order word contains the y coordinate.

Return value

Type: LRESULT

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

Remarks

The parameters are given in screen coordinates for overlapped and pop-up windows and in parent-client coordinates for child windows.

The following example demonstrates how to obtain the position from the lParam parameter.


xPos = (int)(short) LOWORD(lParam);   // horizontal position 
yPos = (int)(short) HIWORD(lParam);   // vertical position 

You can also use the MAKEPOINTS macro to convert the lParam parameter to a POINTS structure.

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
Conceptual
Windows
Other Resources
MAKEPOINTS
POINTS

 

 

Show:
© 2017 Microsoft