CMFCToolBarsCustomizeDialog Class

A modeless tab dialog box (CPropertySheet Class) that enables the user to customize the toolbars, menus, keyboard shortcuts, user-defined tools, and visual style in an application. Typically, the user accesses this dialog box by selecting Customize from the Tools menu.

The Customize dialog box has six tabs: Commands, Toolbars, Tools, Keyboard, Menu, and Options.

class CMFCToolBarsCustomizeDialog : public CPropertySheet

Members

Public Constructors

Name

Description

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog

Constructs a CMFCToolBarsCustomizeDialog object.

CMFCToolBarsCustomizeDialog::~CMFCToolBarsCustomizeDialog

Destructor.

Public Methods

Name

Description

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::AddButton

Inserts a toolbar button into the list of commands on the Commands page

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::AddMenu

Loads a menu from the resources and calls CMFCToolBarsCustomizeDialog::AddMenuCommands to add that menu to the list of commands on the Commands page.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::AddMenuCommands

Loads a menu from the resources and calls CMFCToolBarsCustomizeDialog::AddMenuCommands to add that menu to the list of commands on the Commands page.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::AddToolBar

Loads a toolbar from the resources. Then, for each command in the menu calls the CMFCToolBarsCustomizeDialog::AddButton method to insert a button in the list of commands on the Commands page under the specified category.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::Create

Displays the Customization dialog box.

CMFCToolBarsCustomizeDialog::EnableTools

Reserved for future use.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::EnableUserDefinedToolbars

Enables or disables creating new toolbars by using the Customize dialog box.

CMFCToolBarsCustomizeDialog::FillAllCommandsList

Populates the provided CListBox object with the commands in the All Commands category.

CMFCToolBarsCustomizeDialog::FillCategoriesComboBox

Populates the provided CComboBox object with the name of each command category in the Customize dialog box.

CMFCToolBarsCustomizeDialog::FillCategoriesListBox

Populates the provided CListBox object with the name of each command category in the Customize dialog box.

CMFCToolBarsCustomizeDialog::GetCommandName

Retrieves the name that is associated with the given command ID.

CMFCToolBarsCustomizeDialog::GetCountInCategory

Retrieves the number of items in the provided list that have a given text label.

CMFCToolBarsCustomizeDialog::GetFlags

Retrieves the set of flags that affect the behavior of the dialog box.

CMFCToolBarsCustomizeDialog::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::OnEditToolbarMenuImage

Starts an image editor so that a user can customize a toolbar button or menu item icon.

CMFCToolBarsCustomizeDialog::OnInitDialog

Overrides to augment property sheet initialization. (Overrides CPropertySheet::OnInitDialog.)

CMFCToolBarsCustomizeDialog::PostNcDestroy

Called by the framework after the window has been destroyed. (Overrides CPropertySheet::PostNcDestroy.)

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::RemoveButton

Removes the button with the specified command ID from the specified category, or from all categories.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::RenameCategory

Renames a category in the list box of categories on the Commands tab.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::ReplaceButton

Replaces a button in the list of commands on the Commands tab with a new toolbar button object.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::SetUserCategory

Adds a category to the list of categories that will be displayed on the Commands tab.

Protected Methods

Name

Description

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::CheckToolsValidity

Called by the framework to determine whether the list of user-defined tools is valid.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::OnAfterChangeTool

Called by the framework when the properties of a user-defined tool change.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::OnAssignKey

Determines whether a specified keyboard shortcut can be assigned to an action.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::OnBeforeChangeTool

Determines whether a user-defined tool can be changed.

CMFCToolBarsCustomizeDialog::CMFCToolBarsCustomizeDialog::OnInitToolsPage

Called by the framework when the user chooses the Tools tab is requested.

Remarks

To display the Customize dialog box, create a CMFCToolBarsCustomizeDialog object and call the CMFCToolBarsCustomizeDialog::Create method.

While the Customize dialog box is active, the application works in a special mode that limits the user to customization tasks.

Example

The following example demonstrates how to use various methods in the CMFCToolBarsCustomizeDialog class. The example shows how to replace a toolbar button in the list box of commands on the Commands page, enable creating new toolbars by using the Customize dialog box, and display the Customization dialog box. This code snippet is part of the IE Demo sample.

 pDlgCust->ReplaceButton (ID_FAVORITS_DUMMY,
        CMFCToolBarMenuButton ((UINT)-1, menuFavorites, -1, strFavorites));
    pDlgCust->EnableUserDefinedToolbars();
    pDlgCust->Create ();

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CPropertySheet

            CMFCToolBarsCustomizeDialog

Requirements

Header: afxToolBarsCustomizeDialog.h

See Also

Reference

Hierarchy Chart

CPropertySheet Class

Other Resources

MFC Classes