msgs12.hlp (Topic list)
WM_HITTEST (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
WM_HITTEST
xPos = SHORT1FROMMP(mp1);    /* x position */
yPos = SHORT2FROMMP(mp1);    /* y position */
 
The WM_HITTEST message is sent when an application requests a message by
issuing a WinGetMsg or WinPeekMsg function. If the message that would be
retrieved represents a pointer-related event, the WM_HITTEST message is sent
to a window to determine whether the message is destined for that window.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
xPos       Low word of mp1. Specifies the horizontal position of the mouse
           (in window coordinates), relative to the left side of the
           window.
 
yPos       High word of mp1. Specifies the vertical position of the mouse
           (in window coordinates), relative to the bottom of the window.
 
Return Value
 
An application that processes this message should return one of the
following values:
 
Value           Meaning
────────────────────────────────────────────────────────────────────────────
HT_NORMAL       The message (obtained from WinPeekMsg or WinGetMsg) should
                be processed as normal.
 
HT_TRANSPARENT  The part of the window under the pointer is transparent; hit
                testing should continue on windows beneath this window, as
                if the window did not exist.
 
HT_DISCARD      The message should be discarded; no message should be posted
                to the application.
 
HT_ERROR        Processed like HT_DISCARD. The message should be discarded;
                no message should be posted to the application except if the
                message is a button-down message, an alarm sounds.
 
Comments
 
The handling of this message determines whether a disabled window can
process mouse clicks. The default window procedure returns HT_ERROR if the
window is disabled; otherwise, it returns HT_NORMAL.
 
See Also
 
WinGetMsg, WinPeekMsg, WM_MOUSEMOVE