Condividi tramite


CToolBarCtrl::EnableButton

Enables or disables the specified button in a toolbar control.

BOOL EnableButton(
   int nID,
   BOOL bEnable = TRUE 
);

Parameters

  • nID
    Command identifier of the button to enable or disable.

  • bEnable
    TRUE to enable the button; FALSE to disable the button.

Return Value

Nonzero if successful; otherwise zero.

Remarks

When a button has been enabled, it can be pressed and checked. If you want to change more than one button state, consider calling SetState instead.

Requirements

Header: afxcmn.h

See Also

Concepts

CToolBarCtrl Class

CToolBarCtrl Members

Hierarchy Chart

CToolBarCtrl::IsButtonEnabled

CToolBarCtrl::CheckButton

CToolBarCtrl::PressButton

CToolBarCtrl::HideButton

CToolBarCtrl::Indeterminate

CToolBarCtrl::GetState

CToolBarCtrl::SetState