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


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

См. также

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

CToolBarCtrl Class

CToolBarCtrl Members

Hierarchy Chart

CToolBarCtrl::AddButtons

CToolBarCtrl::DeleteButton

CToolBarCtrl::AddBitmap

CToolBarCtrl::AddString

CToolBarCtrl::AddStrings