Condividi tramite


CMFCToolBar::RemoveButton

Removes the button with the specified index from the toolbar.

virtual BOOL RemoveButton(
   int iIndex 
);

Parameters

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

Return Value

Nonzero if the method succeeds, or 0 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 keyboard accelerator table.

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

Requirements

Header: afxtoolbar.h

See Also

Reference

CMFCToolBar Class

Hierarchy Chart

CMFCToolBar::EnableCustomizeButton