CMFCCustomizeButton Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Supports a menu command or a toolbar button that starts a customization dialog box.
class CMFCCustomizeButton : public CMFCToolBarMenuButton
Members
Public Constructors
Name |
Description |
Constructs a CMFCCustomizeButton object. |
|
CMFCCustomizeButton::~CMFCCustomizeButton |
Destructor. |
Public Methods
Name |
Description |
Adds a button to the list of invisible buttons on the parent toolbar. |
|
Determines whether the button can be stored. |
|
Copies the properties of another toolbar button to the current button. (Overrides CMFCToolBarMenuButton::CopyFrom.) |
|
CMFCCustomizeButton::CreateObject |
Used by the framework to create a dynamic instance of this class type. |
Creates a Customize dialog box. |
|
Retrieves the custom command ID of the button. |
|
Retrieves the text of the button. |
|
Retrieves the extra size of the button. |
|
Retrieves the list of invisible buttons on the parent toolbar. |
|
Retrieves the parent toolbar of the button. |
|
CMFCCustomizeButton::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
Posts the WM_COMMAND message to the owner of the parent toolbar of the Customize button. |
|
Determines whether the button is drawn by default. |
|
Determines whether the button is editable. |
|
Determines whether the button can have an empty pop-up menu. |
|
Indicates whether the menu is right-aligned or left-aligned. |
|
Determines whether the background of the button is owner-drawn. |
|
Called by the framework to calculate the size of the button for a specified device context and docking state. (Overrides CMFCToolBarMenuButton::OnCalculateSize.) |
|
Called by the framework to cancel any internal mode. (Overrides CMFCToolBarMenuButton::OnCancelMode.) |
|
Called by the framework when it inserts a button into a new toolbar. (Overrides CMFCToolBarMenuButton::OnChangeParentWnd.) |
|
Called by the framework to draw the button by using the specified styles and options. (Overrides CMFCToolBarMenuButton::OnDraw.) |
|
Specifies whether the button is drawn by default. |
|
Specifies the extra size of the button. |
|
Specifies whether the menu is right-aligned or left-aligned. |
|
Specifies whether the background of the button is owner-drawn. |
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 dialog box. To enable this button in your application, call the CMFCToolBar::EnableCustomizeButton method.
For more information about the customization dialog box, see CMFCToolBarsCustomizeDialog Class.
Example
The following example demonstrates how to retrieve a CMFCCustomizeButton object from a CMFCPopupMenu object, specify that the button is drawn by default, specify the extra size of the button, specify that the menu is right-aligned, and specify that the background of the button is owner-drawn. This code snippet is part of the CustomPages Sample: MFC Toolbar Customization Dialog Application.
// CMFCPopupMenu* pPopupMenu
CMFCCustomizeButton* pCustom = (CMFCCustomizeButton*)pPopupMenu->GetParentButton();
pCustom->SetDefaultDraw(true);
pCustom->SetExtraSize(10,10);
pCustom->SetMenuRightAlign(true);
pCustom->SetPipeStyle(false);
Inheritance Hierarchy
Requirements
Header: afxcustomizebutton.h
See Also
Reference
CMFCToolBar::EnableCustomizeButton
CMFCToolBarsCustomizeDialog Class