Compartilhar via


CMFCToolBar::EnableCustomizeButton

Enables or disables the Add or Remove Buttons button that appears on the end of the toolbar.

void EnableCustomizeButton(
   BOOL bEnable,
   int iCustomizeCmd,
   const CString& strCustomizeText,
   BOOL bQuickCustomize=TRUE 
);
void EnableCustomizeButton(
   BOOL bEnable,
   int iCustomizeCmd,
   UINT uiCustomizeTextResId,
   BOOL bQuickCustomize=TRUE 
);

Parameters

  • [in] bEnable
    Enables or disables the Add or Remove Buttons button.

  • [in] iCustomizeCmd
    The command ID of the Add or Remove Buttons button.

  • [in] strCustomizeText
    The text label of the Add or Remove Buttons button.

  • [in] uiCustomizeTextResId
    The resource string ID of the Add or Remove Buttons button label.

Remarks

If iCustomizeCmd is -1, the framework displays the Add or Remove Buttons when multiple toolbar buttons do not fit in the toolbar area. The button displays a double-left arrow, or chevron, which indicates that there are more buttons.

If iCustomizeCmd specifies a valid command ID, the Add or Remove Buttons button is always displayed. The button has a small down arrow and opens a dropdown menu that contains a single command. This command uses the text label specified by strCustomizeText.

The framework dynamically adds any buttons that do not fit in the toolbar area before the item that is specified by iCustomizeCmd. The chevron is displayed alongside the down arrow.

Requirements

Header: afxtoolbar.h

See Also

Reference

CMFCToolBar Class

Hierarchy Chart