Поделиться через


CToolBarCtrl::PressButton

Presses or releases the specified button in a toolbar control.

BOOL PressButton(
      int nID,
      BOOL bPress = TRUE 
);

Параметры

  • [in] nID
    Command identifier of the button to press or release.

  • [in] bPress
    true to press the specified button; false to release the specified button. The default value is true.

Возвращаемое значение

true if the method is successful; otherwise, false.

Заметки

If you want to change more than one button state, consider calling SetState instead.

This method sends the TB_PRESSBUTTON message, which is described in the Windows SDK.

Требования

Header: afxcmn.h

См. также

Основные понятия

CToolBarCtrl Class

CToolBarCtrl Members

Hierarchy Chart

CToolBarCtrl::IsButtonPressed

CToolBarCtrl::EnableButton

CToolBarCtrl::CheckButton

CToolBarCtrl::HideButton

CToolBarCtrl::Indeterminate

CToolBarCtrl::GetState

CToolBarCtrl::SetState