CMFCRibbonLabel Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CMFCRibbonLabel Class.

Implements a non-clickable text label for a ribbon.

class CMFCRibbonLabel : public CMFCRibbonButton  

Public Constructors

NameDescription
CMFCRibbonLabel::CMFCRibbonLabelConstructs and initializes a CMFCRibbonLabel object with the specified text string.
CMFCRibbonLabel::~CMFCRibbonLabelDestructor.

Public Methods

NameDescription
CMFCRibbonLabel::CreateObjectUsed by the framework to create a dynamic instance of this class type.
CMFCRibbonLabel::GetThisClassUsed by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.
CMFCRibbonLabel::SetACCDataDetermines the accessibility data for the current ribbon label element. (Overrides CMFCRibbonButton::SetACCData.)

Remarks

After you create a ribbon label, add it to a panel by calling CMFCRibbonPanel::Add.

You cannot add a ribbon label to the Quick Access Toolbar.

CObject

CMFCRibbonBaseElement

CMFCRibbonButton

CMFCRibbonLabel

Header: afxRibbonLabel.h

Constructs and initializes a CMFCRibbonLabel object that displays the specified text string.

CMFCRibbonLabel(
    LPCTSTR lpszText,  
    BOOL bIsMultiLine = FALSE);

Parameters

[in] lpszText
The text to appear in the label.

[in] bIsMultiLine
TRUE to specify that the label is a multi-line label; otherwise, FALSE.

Determines the accessibility data for the current ribbon label element.

virtual BOOL SetACCData(
    CWnd* pParent,  
    CAccessibilityData& data);

Parameters

[in] pParent
Represents the parent window of the current ribbon label.

[out] data
An object of type CAccessibilityData that is populated with the accessibility data of the current ribbon label.

Return Value

TRUE if the data parameter was successfully populated with the accessibility data of the current ribbon label; otherwise, FALSE.

Hierarchy Chart
Classes
CMFCRibbonButton Class

Show: