CMFCToolBar::RemoveButton

Removes from the toolbar the button that has the specified index.

virtual BOOL RemoveButton(
   int iIndex 
);

Parameters

  • [in] iIndex
    Specifies the zero-based index of the button to remove.

Return Value

TRUE if the method succeeds, or FALSE if the specified index is invalid or the index refers to the Customize button.

Remarks

This method updates additional toolbar attributes that are affected by the removal of the button. For example, this method removes nonessential separators from the toolbar and rebuilds the table of shortcut keys.

For more information about the Customize button, see CMFCToolBar::EnableCustomizeButton.

Requirements

Header: afxtoolbar.h

See Also

Reference

CMFCToolBar Class

Hierarchy Chart

CMFCToolBar::EnableCustomizeButton