Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CMFCRibbonApplicationButton Class
Collapse the table of content
Expand the table of content

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

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.

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"));


Header: afxRibbonBar.h

Community Additions

ADD
Show:
© 2015 Microsoft