Partager via


CMFCRibbonBar::SetActiveCategory

Sets the specified ribbon category as the active category.

BOOL SetActiveCategory(
   CMFCRibbonCategory* pCategory,
   BOOL bForceRestore = FALSE
);

Parameters

  • [in] pCategory
    A ribbon category that is contained in the ribbon bar.

  • [in] bForceRestore
    TRUE to maximize the ribbon bar if it is minimized; FALSE to display the active category in a pop-up window if the ribbon bar is minimized.

Return Value

TRUE if the specified category was set as the active category; otherwise FALSE.

Remarks

The main ribbon category cannot be the active category.

If the category specified by pCategory is not displayed, it cannot be set as the active category.

Requirements

Header: afxribbonbar.h

See Also

Reference

CMFCRibbonBar Class

Hierarchy Chart