CMFCRibbonCustomizePropertyPage Class
Implements a custom page for the Customize dialog box in Ribbon-based applications.
class CMFCRibbonCustomizePropertyPage: public CMFCPropertyPage
Members
Public Constructors
Name |
Description |
CMFCRibbonCustomizePropertyPage::CMFCRibbonCustomizePropertyPage |
Constructs a CMFCRibbonCustomizePropertyPage object. |
CMFCRibbonCustomizePropertyPage::~CMFCRibbonCustomizePropertyPage |
Destructor. |
Public Methods
Name |
Description |
Adds a custom category to the Commands combo box. |
|
CMFCRibbonCustomizePropertyPage::CreateObject |
Used by the framework to create a dynamic instance of this class type. |
CMFCRibbonCustomizePropertyPage::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
Called by the system when a user clicks OK on the Customize dialog box. |
Remarks
If you want to add custom commands to the Customize dialog box, you must handle the AFX_WM_ON_RIBBON_CUSTOMIZE message. In the message handler, instantiate a CMFCRibbonCustomizePropertyPage object on the stack. Create a list of custom commands, and then call AddCustomCategory to add the new page to the Customize dialog box.
Example
The following example demonstrates how to construct a CMFCRibbonCustomizePropertyPage object and to add a custom category.
// Create "Customize" page
// CMFCRibbonBar m_wndRibbonBar
CMFCRibbonCustomizePropertyPage pageCustomize(&m_wndRibbonBar);
// Create a list of popular items:
CList<UINT, UINT> lstPopular;
lstPopular.AddTail(ID_FILE_NEW);
lstPopular.AddTail(ID_FILE_OPEN);
// add a custom category
pageCustomize.AddCustomCategory(_T("Popular Commands"), lstPopular);
Inheritance Hierarchy
CMFCRibbonCustomizePropertyPage
Requirements
Header: afxribboncustomizedialog.h