共用方式為


CToolBarCtrl::GetButton

Retrieves information about the specified button in a toolbar control.

BOOL GetButton( 
   int nIndex, 
   LPTBBUTTON lpButton  
) const;

Parameters

  • nIndex
    Zero-based index of the button for which to retrieve information.

  • lpButton
    Address of the TBBUTTON structure that is to receive a copy of the button information. See CToolBarCtrl::AddButtons for information about the TBBUTTON structure.

Return Value

Nonzero if successful; otherwise zero.

Requirements

Header: afxcmn.h

See Also

Reference

CToolBarCtrl Class

Hierarchy Chart

CToolBarCtrl::GetState

CToolBarCtrl::SetState

CToolBarCtrl::GetButtonCount

CToolBarCtrl::GetItemRect

CToolBarCtrl::CommandToIndex

CToolBarCtrl::AddButtons

CToolBarCtrl::InsertButton