Share via


CMFCRibbonApplicationButton Class

Implements a special button located in the top-left corner of the application window. When clicked, the button opens a menu that usually contains common File commands like Open, Save, and Exit.

class CMFCRibbonApplicationButton : public CMFCRibbonButton

Members

Public Constructors

Name

Description

CMFCRibbonApplicationButton::CMFCRibbonApplicationButton

Constructs and initializes a CMFCRibbonApplicationButton object.

Public Methods

Name

Description

CMFCRibbonApplicationButton::CreateObject

Used by the framework to create a dynamic instance of this class type.

CMFCRibbonApplicationButton::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CMFCRibbonApplicationButton::SetImage

Assigns an image to the ribbon application button.

Example

The following example demonstrates how to use various methods in the CMFCRibbonApplicationButton class. The example shows how to assign an image to the application button, and how to set its tooltip. This code snippet is part of the Draw Client sample.

 CMFCRibbonApplicationButton m_MainButton;


...


    m_MainButton.SetImage(IDB_RIBBON_MAIN);
    m_MainButton.SetToolTipText(_T("File"));
    // Set the short cut keyboard text.
    m_MainButton.SetText(_T("f"));

Inheritance Hierarchy

CObject

   CMFCRibbonBaseElement

      CMFCRibbonButton

         CMFCRibbonApplicationButton

Requirements

Header: afxRibbonBar.h

See Also

Reference

Hierarchy Chart

CMFCRibbonButton Class

Other Resources

MFC Classes