The CMFCRibbonCategory class implements a ribbon tab that contains a group of ribbon panels.
Adds a hidden element to the ribbon category.
Adds a new panel to the ribbon category.
Returns the context ID of the ribbon category.
Returns the user-defined data that is associated with the ribbon category.
Obtain a first visible element that belong to the ribbon category.
Returns a focused element.
Returns a highlighted element.
Obtain a last visible element that belong to the ribbon category
Returns a reference to the list of large images that the ribbon category uses.
Returns a pointer to the ribbon panel that is located at the specified index.
Returns the number of ribbon panels in the ribbon category.
Returns the index of the specified ribbon panel.
Returns a reference to the list of small images that the category uses.
Returns the current color of the ribbon category tab.
Obtain all visible elements that belong to the ribbon category.
Determines whether the ribbon category is visible.
Indicates whether the parent ribbon has Windows 7-style look (small rectangular application button)
Called by the framework when a user presses a keyboard button.
Defines the collapse order of the ribbon panels that are present in the ribbon category.
Stores the user defined data in the ribbon category.
Assigns a keytip to the ribbon category.
Sets the color of the ribbon category.
Typically, you create a ribbon category indirectly by calling CMFCRibbonBar::AddCategory, which returns a pointer to the newly created ribbon category. You add panels to the category by calling CMFCRibbonCategory::AddPanel.
The CMFCRibbonTab class draws ribbon categories. It is derived from CMFCRibbonBaseElement Class.
This following example demonstrates how to create a ribbon category and add a panel to it.
// Create a new ribbon category and get a pointer to it
CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory
(_T("&Write"), // Category name
IDB_WRITE, // Category small images (16 x 16)
IDB_WRITE_LARGE); // Category large images (32 x 32)
// Add a panel to the new category
CMFCRibbonPanel* pPanel = pCategory->AddPanel (
_T("Clipboard"), // Panel name
m_PanelIcons.ExtractIcon (0)); // Panel icon
The following diagram shows a figure of the Home category from the RibbonApp sample application.