Share via


CMFCToolBarsCustomizeDialog::FillCategoriesListBox

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

void FillCategoriesListBox(
   CListBox& wndCategory,
   BOOL bAddEmpty = TRUE
) const;

Parameters

  • [out] wndCategory
    A reference to the CListBox object to populate.

  • [in] bAddEmpty
    A Boolean value that specifies whether to add categories to the list box that do not have commands. If this parameter is TRUE, empty categories are added to the list box. Otherwise, empty categories are not added.

Remarks

This method is like the CMFCToolBarsCustomizeDialog::FillCategoriesComboBox method except that this method works with a CListBox object.

This method does not clear the contents of the CListBox object before populating it. It guarantees that the All Commands category is the final item in the list box.

You can add new command categories by using the CMFCToolBarsCustomizeDialog::AddButton method. You can change the name of an existing category by using the CMFCToolBarsCustomizeDialog::RenameCategory method.

The CMFCToolBarsCommandsPropertyPage class uses this method to show the list of commands that is associated with each command category.

Requirements

Header: afxtoolbarscustomizedialog.h

See Also

Reference

CMFCToolBarsCustomizeDialog Class

Hierarchy Chart

CListBox Class

CMFCToolBarsCustomizeDialog::FillCategoriesComboBox

CMFCToolBarsCustomizeDialog::AddButton

CMFCToolBarsCustomizeDialog::RenameCategory