Help Center

CToolbar.PressButtonmethod

Presses the specified button in a toolbar.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION PressButton (BYVAL hToolbar AS HWND, BYVAL idButton AS LONG, BYVAL fPress AS SHORT) AS BOOLEAN
FUNCTION PressButton (BYVAL hToolbar AS HWND, BYVAL idButton AS LONG) AS BOOLEAN
Also documented as ReleaseButton — one description covers them all.

Parameters

NameDescription
hToolbarHandle to the toolbar control.
idButtonCommand identifier of the button to press or release.
fPressIf TRUE, the button is pressed. If FALSE, the button is released.

Return value

Returns TRUE if successful, or FALSE otherwise.

Description

Presses or releases the specified button in a toolbar.

Reference

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