description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CMFCRibbonContextCaption Class |
CMFCRibbonContextCaption Class |
11/04/2016 |
|
|
cce2c0a2-8370-4266-997e-f8d0eeb3d616 |
Implements a colored caption that appears at the top of a ribbon category or a context category.
class CMFCRibbonContextCaption : public CMFCRibbonButton
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. |
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.
Header: afxRibbonBar.h
Returns the background color of the caption.
AFX_RibbonCategoryColor GetColor() const;
The returned value can be one of the following enumerated values:
-
AFX_CategoryColor_None
-
AFX_CategoryColor_Red
-
AFX_CategoryColor_Orange
-
AFX_CategoryColor_Yellow
-
AFX_CategoryColor_Green
-
AFX_CategoryColor_Blue
-
AFX_CategoryColor_Indigo
-
AFX_CategoryColor_Violet
The color of the caption can be set by calling CMFCRibbonCategory::SetTabColor or CMFCRibbonBar::AddContextCategory.
Retrieves the position of the right-hand edge of the category's ribbon tab.
int GetRightTabX() const;
Returns the right-hand X-value of the enclosing rectangle of the CMFCRibbonCategory
object's ribbon tab, or a value of -1 if the tab is truncated.
Hierarchy Chart
Classes
CMFCRibbonButton Class
CMFCRibbonCategory Class
CMFCRibbonBar Class