Compartir a través de


CToolBarCtrl::CheckButton

Checks or clears a given button in a toolbar control.

BOOL CheckButton(
   int nID,
   BOOL bCheck = TRUE 
);

Parameters

  • nID
    Command identifier of the button to check or clear.

  • bCheck
    TRUE to check the button, FALSE to clear it.

Return Value

Nonzero if successful; otherwise zero.

Remarks

When a button has been checked, it appears to have been pressed. 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::IsButtonChecked

CToolBarCtrl::EnableButton

CToolBarCtrl::PressButton

CToolBarCtrl::HideButton

CToolBarCtrl::Indeterminate

CToolBarCtrl::GetState

CToolBarCtrl::SetState