CMFCRibbonQuickAccessToolBarDefaultState Class
A helper class that manages default state for the Quick Access Toolbar that is positioned on the ribbon bar (CMFCRibbonBar Class).
class CMFCRibbonQuickAccessToolBarDefaultState
Members
Public Constructors
Name |
Description |
---|---|
CMFCRibbonQuickAccessToolBarDefaultState::CMFCRibbonQuickAccessToolBarDefaultState |
Constructs a CMFCRibbonQuickAccessToolbarDefaultState object. |
Public Methods
Name |
Description |
---|---|
Adds a command to the default state for the Quick Access Toolbar. This does not change the toolbar itself. |
|
Copies the properties of one Quick Access Toolbar to another. |
|
Removes all commands from the Quick Access Toolbar. This does not change the toolbar itself. |
Remarks
After you create the Quick Access Toolbar in your application, we recommend that you set its default state by calling CMFCRibbonBar::SetQuickAccessDefaultState. This default state is restored when a user clicks the Reset button on the Customize page of your application's Options dialog box.
Inheritance Hierarchy
CMFCRibbonQuickAccessToolBarDefaultState
Example
The following example demonstrates how to construct an object of the CMFCRibbonQuickAccessToolbarDefaultState class and how to add a command to the default state for the Quick Access Toolbar.
CMFCRibbonQuickAccessToolBarDefaultState* qaToolBarState =
new CMFCRibbonQuickAccessToolBarDefaultState();
qaToolBarState->AddCommand(ID_FILE_NEW, true);
qaToolBarState->AddCommand(ID_FILE_OPEN, true);
Requirements
Header: afxribbonquickaccesstoolbar.h
See Also
Reference
CMFCRibbonBar::SetQuickAccessDefaultState