The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
WM_NCHITTEST xPos = LOWORD(lParam); // horizontal position of cursor yPos = HIWORD(lParam); // vertical position of cursor
The return value of the DefWindowProc function is one of the following values, indicating the position of the cursor hot spot:
Value |
Location of hot spot |
HTBORDER |
In the border of a window that does not have a sizing border |
HTBOTTOM |
In the lower horizontal border of a window |
HTBOTTOMLEFT |
In the lower-left corner of a window border |
HTBOTTOMRIGHT |
In the lower-right corner of a window border |
HTCAPTION |
In a title bar |
HTCLIENT |
In a client area |
HTCLOSE |
In a close button |
HTERROR |
On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error) |
HTGROWBOX |
In a size box (same as HTSIZE) |
HTHELP |
In a Help button |
HTHSCROLL |
In a horizontal scroll bar |
HTLEFT |
In the left border of a window |
HTMENU |
In a menu |
HTMAXBUTTON |
In Maximize button |
HTMINBUTTON |
In Minimize button |
HTNOWHERE |
On the screen background or on a dividing line between windows |
HTREDUCE |
In a Minimize button |
HTRIGHT |
In the right border of a window |
HTSIZE |
In a size box (same as HTGROWBOX) |
HTSYSMENU |
In a System menu or in a Close button in a child window |
HTTOP |
In the upper horizontal border of a window |
HTTOPLEFT |
In the upper-left corner of a window border |
HTTOPRIGHT |
In the upper right corner of a window border |
HTTRANSPARENT |
In a window currently covered by another window |
HTVSCROLL |
In the vertical scroll bar |
HTZOOM |
In a Maximize button |
An application can use the MAKEPOINTS macro to convert the lParam parameter to a POINTS structure.
DefWindowProc, MAKEPOINTS, POINTS
file: /Techref/os/win/api/win32/mess/src/msg26_5.htm, 6KB, , updated: 2000/4/7 12:20, local time: 2024/10/8 18:30,
44.222.134.250:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/os/win/api/win32/mess/src/msg26_5.htm"> WM_NCHITTEST</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.