CToolTipCtrl::HitTest

BOOL HitTest( CWnd* pWnd, CPoint pt, LPTOOLINFO lpToolInfo ) const;

Return Value

Nonzero if the point specified by the hit-test information is within the tool’s bounding rectangle; otherwise 0.

Parameters

pWnd

Pointer to the window that contains the tool.

pt

Pointer to a CPoint object containing the coordinates of the point to be tested.

lpToolInfo

Pointer to TOOLINFO structure that contains information about the tool.

Remarks

Call this function to test a point to determine whether it is within the bounding rectangle of the given tool and, if so, retrieve information about the tool.

If this function returns a nonzero value, the structure pointed to by lpToolInfo is filled with information on the tool within whose rectangle the point lies.

The TTHITTESTINFO structure is defined as follows:

typedef struct _TT_HITTESTINFO { // tthti
    HWND hwnd;   // handle of tool or window with tool
    POINT pt;    // client coordinates of point to test
    TOOLINFO ti; // receives information about the tool
} TTHITTESTINFO, FAR * LPHITTESTINFO;

hwnd

Specifies the tool’s handle.

pt

Specifies the coordinates of a point if the point is in the tool’s bounding rectangle.

ti

Information about the tool. For more information about the TOOLINFO structure, see CToolTipCtrl::GetToolInfo.

CToolTipCtrl OverviewClass MembersHierarchy Chart

See Also   CToolTipCtrl::GetToolInfo