This message is sent to the window that contains the cursor (or the window that used the GetCapture function to capture the mouse input) every time the mouse is moved.
Parameter | Description |
wParam | Is not used. | |
lParam | Contains the x- and y-coordinates of the cursor. The x-coordinate is in the low-order word; the y-coordinate is in the high-order word. These coordinates are always screen coordinates. |
The return value of the DefWindowProc function is one of the values given in Table R.2, indicating the position of the cursor:
Table R.2 Hit-Test Codes
Code | Meaning |
HTBOTTOM | In the lower horizontal border of window. | |
HTBOTTOMLEFT | In the lower-left corner of window border. | |
HTBOTTOMRIGHT | In the lower-right corner of window border. | |
HTCAPTION | In a caption area. | |
HTCLIENT | In a client area. | |
HTERROR | Same as HTNOWHERE except that the DefWindowProc function produces a system beep to indicate an error. | |
HTGROWBOX | In a size box. | |
HTHSCROLL | In the horizontal scroll bar. | |
HTLEFT | In the left border of window. | |
HTMENU | In a menu area. | |
HTNOWHERE | On the screen background or on a dividing line between windows. | |
HTREDUCE | In a minimize box. | |
HTRIGHT | In the right border of window. | |
HTSIZE | Same as HTGROWBOX. | |
HTSYSMENU | In a control-menu box (close box in child windows). | |
HTTOP | In the upper horizontal border of window. | |
HTTOPLEFT | In the upper-left corner of window border. | |
HTTOPRIGHT | In the upper-right corner of window border. | |
HTTRANSPARENT | In a window currently covered by another window. | |
HTVSCROLL | In the vertical scroll bar. | |
HTZOOM | In a maximize box. | |
The MAKEPOINT macro can be used to convert the lParam parameter to a POINT structure.