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

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

bIsMultiLine
[in] 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

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

data
[out] 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