Share via


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.

Syntax

class CMFCRibbonLabel : public CMFCRibbonButton  

Members

Public Constructors

Name Description
CMFCRibbonLabel::CMFCRibbonLabel Constructs and initializes a CMFCRibbonLabel object with the specified text string.
CMFCRibbonLabel::~CMFCRibbonLabel Destructor.

Public Methods

Name Description
CMFCRibbonLabel::CreateObject Used by the framework to create a dynamic instance of this class type.
CMFCRibbonLabel::GetThisClass Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.
CMFCRibbonLabel::SetACCData Determines 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.

Inheritance Hierarchy

CObject

CMFCRibbonBaseElement

CMFCRibbonButton

CMFCRibbonLabel

Requirements

Header: afxRibbonLabel.h

CMFCRibbonLabel::CMFCRibbonLabel

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.

CMFCRibbonLabel::SetACCData

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.

See Also

Hierarchy Chart
Classes
CMFCRibbonButton Class