Expand Minimize
This topic has not yet been rated - Rate this topic

CToolBarCtrl::InsertButton

Inserts a button in a toolbar control.

BOOL InsertButton( 
   int nIndex, 
   LPTBBUTTON lpButton  
);
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.

Nonzero if successful; otherwise zero.

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.

Header: afxcmn.h

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.