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

CMFCRibbonQuickAccessToolBarDefaultState::AddCommand

Adds a command to the default state for the Quick Access Toolbar. This does not change the toolbar itself.

CMFCRibbonQuickAccessToolBarDefaultState::CopyFrom

Copies the properties of one Quick Access Toolbar to another.

CMFCRibbonQuickAccessToolBarDefaultState::RemoveAll

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

Hierarchy Chart

CMFCRibbonBar Class

CMFCRibbonBar::SetQuickAccessDefaultState

Other Resources

MFC Classes