Help Center

CToolbar.GetRectmethod

Retrieves the bounding rectangle for a specified toolbar button.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION GetRect (BYVAL hToolbar AS HWND, BYVAL iID AS LONG, BYVAL prc AS RECT PTR) AS BOOLEAN
FUNCTION GetRect (BYVAL hToolbar AS HWND, BYVAL iID AS LONG, BYREF rc AS RECT) AS BOOLEAN
FUNCTION GetRect (BYVAL hToolbar AS HWND, BYVAL iID AS LONG) AS RECT

Parameters

NameDescription
hToolbarHandle to the toolbar control.
iIDCommand identifier of the button.
prcPointer to a RECT structure that will receive the bounding rectangle information.
rcA RECT structure that will receive the bounding rectangle information.

Description

Retrieves the bounding rectangle for a specified toolbar button.

Remarks

Returns nonzero if successful, or zero otherwise.

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:714
  • Documented in Windows/WIndows Controls/CToolbar Class.md
  • Topic: CToolbar Class