Condividi tramite


CToolBarCtrl::HitTest

Determines where a point lies in a toolbar control.

int HitTest(
   LPPOINT ppt 
) const;

Parameters

  • ppt
    A pointer to a POINT structure that contains the x-coordinate of the hit test in the x member and the y-coordinate of the hit test in the y member. The coordinates are relative to the toolbar's client area.

Return Value

An integer value indicating the location of a point on a toolbar. If the value is zero or a positive value, this return value is the zero-based index of the nonseparator item in which the point lies.

If the return value is negative, the point does not lie within a button. The absolute value of the return value is the index of a separator item or the nearest nonseparator item.

Remarks

This member function implements the behavior of the Win32 message TB_HITTEST, as described in the Windows SDK.

Requirements

Header: afxcmn.h

See Also

Concepts

CToolBarCtrl Class

CToolBarCtrl Members

Hierarchy Chart