WM HITTEST
Appearance
This message is sent to determine which window is associated with an input from the pointing device.
Syntax
param1 POINTS ptspointerpos; /* Pointer position. */ param2 ULONG ulReserved; /* Reserved value, should be 0. */
Parameters
- ptspointerpos (POINTS) - Input
- Pointer position. The pointer position is in window coordinates relative to the bottom-left corner of the window.
- ulReserved (ULONG) - Input
- Reserved value, should be 0.
Returns
- ulresult (ULONG) - returns
- Hit-test indicator. The application may return one of these values:
- HT_NORMAL
- The message should be processed as normal. A WM_MOUSEMOVE, WM_BUTTON2DOWN, or WM_BUTTON1DOWN message is posted to the window.
- HT_TRANSPARENT
- The part of the window underneath the pointer is transparent; hit-testing should continue on windows underneath this window, as if the window did not exist.
- HT_DISCARD
- The message should be discarded; no message is posted to the application.
- HT_ERROR
- As HT_DISCARD, except that if the message is a button-down message, an alarm sounds and the window concerned is brought to the foreground.
Remarks
This message occurs when an application requests a message by issuing a WinPeekMsg or a WinGetMsg function.
If the message that is to be retrieved represents a pointer related event, this message is sent to a window to determine whether the message is in fact destined for that window.
This message is only sent if the window class has the CS_HITTEST style set.
- Note
- The handling of this message determines whether a disabled window can process pointing device events.
Default Processing
The default window procedure takes no action on this message, other than to set ulresult to HT_ERROR if the window is disabled, or to HT_NORMAL otherwise.