共用方式為


CMFCRibbonContextCaption Class

Implements a colored caption that appears at the top of a ribbon category or a context category.

class CMFCRibbonContextCaption : public CMFCRibbonButton

Members

Public Methods

Name

Description

CMFCRibbonContextCaption::CreateObject

Used by the framework to create a dynamic instance of this class type.

CMFCRibbonContextCaption::GetColor

Returns the color of the caption.

CMFCRibbonContextCaption::GetRightTabX

 

CMFCRibbonContextCaption::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

Remarks

This class cannot be directly instantiated. The CMFCRibbonBar Class class uses this class internally to add color to ribbon categories.

To set the color for ribbon categories, call CMFCRibbonCategory::SetTabColor. To set the color for context categories, call CMFCRibbonBar::AddContextCategory.

Inheritance Hierarchy

CObject

   CMFCRibbonBaseElement

      CMFCRibbonButton

         CMFCRibbonContextCaption

Requirements

Header: afxRibbonBar.h

See Also

Reference

Hierarchy Chart

CMFCRibbonButton Class

CMFCRibbonCategory Class

CMFCRibbonBar Class

Other Resources

MFC Classes