Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sent after a window has been moved.
A window receives this message through its WindowProc function.
#define WM_MOVE 0x0003
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.
Type: LRESULT
If an application processes this message, it should return zero.
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.
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
Reference
Conceptual
Other Resources
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!