BCGControlBar Pro for MFC
CBCGPRibbonCategory* CBCGPRibbonBar::AddContextCategory ( LPCTSTR  lpszName,
LPCTSTR  lpszContextName,
UINT  uiContextID,
BCGPRibbonCategoryColor  clrContext,
UINT  uiSmallImagesResID,
UINT  uiLargeImagesResID,
CSize  sizeSmallImage = CSize(16, 16),
CSize  sizeLargeImage = CSize(32, 32),
CRuntimeClass *  pRTI = NULL 
)

Adds a context category.

Returns
A pointer to the newly created category.

Use this function to add a context category. Context categories are a special type of categories, which can be shown or hidden at runtime depending on the current application context. For example, when the user selects an object, you can display special tabs with context categories intended to manipulate the specific selected object.

The context category color should be one of the following values:

  • BCGPCategoryColor_None
  • BCGPCategoryColor_Red
  • BCGPCategoryColor_Orange
  • BCGPCategoryColor_Yellow
  • BCGPCategoryColor_Green
  • BCGPCategoryColor_Blue
  • BCGPCategoryColor_Indigo
  • BCGPCategoryColor_Violet
Parameters
lpszNameSpecifies the category name.
lpszContextNameSpecifies the category context name.
uiContextIDContext ID.
clrContextContext category color.
uiSmallImagesResIDResource ID of category small image.
uiLargeImagesResIDResource ID of category large image.
sizeSmallImageSize of small image.
sizeLargeImageSize of large image.
pRTIA new category runtime class. Should be either NULL or derived from CBCGPRibbonCategory.