Help Center

CToolbar.GetItemRectmethod

Retrieves the bounding rectangle of a button in a toolbar.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION GetItemRect (BYVAL hToolbar AS HWND, BYVAL nButton AS LONG, BYVAL prc AS RECT PTR) AS BOOLEAN
FUNCTION GetItemRect (BYVAL hToolbar AS HWND, BYVAL nButton AS LONG, BYREF rc AS RECT) AS BOOLEAN
FUNCTION GetItemRect (BYVAL hToolbar AS HWND, BYVAL nButton AS LONG) AS RECT

Parameters

NameDescription
hToolbarHandle to the toolbar control.
nButtonZero-based index of the button for which to retrieve information.
prcPointer to a RECT structure that receives the client coordinates of the bounding rectangle.
rcA RECT structure that receives the client coordinates of the bounding rectangle.

Return value

Returns TRUE if successful, or FALSE otherwise.

Description

Retrieves the bounding rectangle of a button in a toolbar.

Remarks

This message does not retrieve the bounding rectangle for buttons whose state is set to the TBSTATE_HIDDEN value.

Reference

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