Bagikan melalui


CToolBarCtrl::InsertButton

Inserts a button in a toolbar control.

BOOL InsertButton(
   int nIndex,
   LPTBBUTTON lpButton 
);

Parameters

  • nIndex
    Zero-based index of a button. This function inserts the new button to the left of this button.

  • lpButton
    Address of a TBBUTTON structure containing information about the button to insert. See CToolBarCtrl::AddButtons for a description of the TBBUTTON structure.

Return Value

Nonzero if successful; otherwise zero.

Remarks

The image and/or string whose index you provide must have previously been added to the toolbar control's list using AddBitmap, AddString, and/or AddStrings.

Requirements

Header: afxcmn.h

See Also

Reference

CToolBarCtrl Class

Hierarchy Chart

CToolBarCtrl::AddButtons

CToolBarCtrl::DeleteButton

CToolBarCtrl::AddBitmap

CToolBarCtrl::AddString

CToolBarCtrl::AddStrings

Other Resources

CToolBarCtrl Members