For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
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
|CMFCRibbonApplicationButton::CMFCRibbonApplicationButton||Constructs and initializes a |
|Used by the framework to create a dynamic instance of this class type.|
|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.
m_MainButton.SetImage(IDB_RIBBON_MAIN); m_MainButton.SetToolTipText(_T("File")); // Set the short cut keyboard text. m_MainButton.SetText(_T("f"));
Constructs and initializes a CMFCRibbonApplicationButton object.
CMFCRibbonApplicationButton(); CMFCRibbonApplicationButton(UINT uiBmpResID); CMFCRibbonApplicationButton(HBITMAP hBmp);
The resource ID of the image to display on the application button.
A handle to a bitmap to display on the application button.
The ribbon application button is a special button that is located in the upper-left corner of the application window. When a user clicks this button, the application opens a menu that usually contains common File commands, such as Open, Save, and Exit.
Assigns an image to the application button.
void SetImage(UINT uiBmpResID); void SetImage(HBITMAP hBmp); ``` ### Parameters [in] `uiBmpResID` The resource ID of the image to display on the application button. [in] `hBmp` A handle to a bitmap to display on the application button. ### Remarks Use this method to assign a new image to the ribbon application button after you create the button. The application button is located in the upper-left corner of the application window. ## See Also [Hierarchy Chart](../Topic/Hierarchy%20Chart.md) [Classes](../Topic/MFC%20Classes.md) [CMFCRibbonButton Class](../Topic/CMFCRibbonButton%20Class.md)