CMFCCustomizeMenuButton Class
Represents a single button on a customization menu.
class CMFCCustomizeMenuButton : public CMFCToolBarMenuButton
Members
Public Constructors
Name |
Description |
Constructs a CMFCCustomizeMenuButton object. |
|
CMFCCustomizeMenuButton::~CMFCCustomizeMenuButton |
Destructor. |
Public Methods
Name |
Description |
CMFCCustomizeMenuButton::CreateObject |
Used by the framework to create a dynamic instance of this class type. |
Enables or disables menu button customization. |
|
Retrieves the parent toolbar of the menu button. |
|
CMFCCustomizeMenuButton::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
Determines whether the given command ID is in the customization menu. |
|
Specifies whether a menu bar displays recently used menu commands. |
|
Updates the state of the menu button. |
|
Sets the parent toolbar of the menu button. |
|
Designates the menu button as a separator. |
|
Designates the menu button as a sibling button. |
Remarks
This class supports the MFC framework infrastructure and is not intended to be used directly from your code.
The framework uses this class to display the customization menu. To enable this menu in your application, call the CMFCToolBar::EnableCustomizeButton method.
Example
The following example demonstrates how to get a CMFCCustomizeMenuButton object from a CMFCPopupMenuBar object, enable menu button customization, and designate the menu button as a separator. This code snippet is part of the DrawClient Sample: MFC Ribbon-Based OLE Object Drawing Application.
// CMFCPopupMenuBar* pMenuBar
CMFCCustomizeMenuButton* pBtn = (CMFCCustomizeMenuButton*)pMenuBar->GetButton(0);
pBtn->EnableCustomization(true);
pBtn->SetSeparator();
Inheritance Hierarchy
Requirements
Header: afxcustomizemenubutton.h