Upravit

Sdílet prostřednictvím


TTM_HITTEST message

Tests a point to determine whether it is within the bounding rectangle of the specified tool and, if it is, retrieves information about the tool.

Parameters

wParam

Must be zero.

lParam

Pointer to a TTHITTESTINFO structure. When sending the message, the hwnd member must specify the handle to a tool and the pt member must specify the coordinates of a point. If the return value is TRUE, the ti member (a TOOLINFO structure) receives information about the tool that occupies the point. The cbSize member of the ti structure must be filled in before sending this message.

Return value

Returns TRUE if the tool occupies the specified point, or FALSE otherwise.

Remarks

This message must be sent when the tool has the TTF_TRACK flag set. For more information on this flag, see TOOLINFO. TTM_HITTEST will fail if TTF_TRACK is not set, regardless if the hit point is in the tools rectangle or not.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h
Unicode and ANSI names
TTM_HITTESTW (Unicode) and TTM_HITTESTA (ANSI)