void CBCGPRibbonBar::SetApplicationModes | ( | UINT | nModes, |
BOOL | bResetKeyboardAccelerators = TRUE , |
||
BOOL | bRecalc = TRUE |
||
) |
Sets Ribbon application modes.
nModes | The list of current application modes. (UINT)-1 means all application modes. |
bResetKeyboardAccelerators | TRUE to reset keyboard accelerators. |
bRecalc | Specifies 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.