Help Center

CToolbar.HitTestmethod

Determines where a point lies in a toolbar control.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION HitTest (BYVAL hToolbar AS HWND, BYVAL pptHitTest AS POINT PTR) AS LONG
FUNCTION HitTest (BYVAL hToolbar AS HWND, BYREF ptHitTest AS POINT) AS LONG
FUNCTION HitTest (BYVAL hToolbar AS HWND) AS POINT

Parameters

NameDescription
hToolbarHandle to the toolbar control.
pptHitTestPointer 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.
ptHitTestA 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

Returns an integer value. If the return value is zero or a positive value, it 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.

Description

Determines where a point lies in a toolbar control.

Reference

  • Include file CToolbar.inc
  • Defined in AfxNova/CToolbar.inc:811
  • Documented in Windows/WIndows Controls/CToolbar Class.md
  • Topic: CToolbar Class