CMFCRibbonBaseElement::SetText

Sets the text and keytip for the ribbon element.

virtual void SetText(
   LPCTSTR lpszText 
);

Parameters

  • [in] lpszText
    The text and keytip for the ribbon element.

Remarks

To set the keytip for the ribbon element, append the newline escape sequence followed by the keytip characters to lpszText.

Example

//Set the text for the ribbon element
SetText(_T("Margins"))
//Set the text and a single-letter keytip
SetText(_T("Margins\nm"))
//Set the text and a multiple-letter keytip
SetText(_T("Line Numbers\nln"))

Requirements

Header: afxbaseribbonelement.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCRibbonBaseElement Class

Change History

Date

History

Reason

October 2008

Updated whole topic.

Information enhancement.