Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Sets the specified ribbon category as the active category.

BOOL SetActiveCategory(
   CMFCRibbonCategory* pCategory,
   BOOL bForceRestore = FALSE

[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.

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

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.

Header: afxribbonbar.h

© 2015 Microsoft