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.
The DefWindowProc function sends the WM_SIZE and WM_MOVE messages when it processes the WM_WINDOWPOSCHANGED message. The WM_SIZE and WM_MOVE messages are not sent if an application handles the WM_WINDOWPOSCHANGED message without calling DefWindowProc.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
See also
-
Reference
-
Conceptual
-
Other Resources