BCGControlBar Pro for MFC
void CBCGPRibbonBar::SetApplicationModes ( UINT  nModes,
BOOL  bResetKeyboardAccelerators = TRUE,
BOOL  bRecalc = TRUE 
)

Sets Ribbon application modes.

Parameters
nModesThe list of current application modes. (UINT)-1 means all application modes.
bResetKeyboardAcceleratorsTRUE to reset keyboard accelerators.
bRecalcSpecifies whether the Ribbon Bar should recalculate layout.

Ribbon Application Modes support provides a simple and efficient way to associate various Ribbon elements (such as buttons, panels or categories) with specific application modes and automatically hide "non-relevant" Ribbon elements at run time. For example, if your application has demonstration and standard modes and file saving operation is not available in the demo mode, associate save buttons with the standard mode using CBCGPBaseRibbonElement::SetApplicationModes method.