IUIFramework::SetModes method (uiribbon.h)

Specifies the application modes to enable.

Syntax

HRESULT SetModes(
  INT32 iModes
);

Parameters

iModes

Type: INT32

A bit mask that identifies the modes.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

A mode indicates the functionality required and, therefore, which elements should be displayed (or hidden) at run time, depending on the state or context of an application. For example, network connectivity may directly impact the functionality of an application and require a "Network" mode of network-related commands whenever a connection is detected.

Modes are specified for elements in the Ribbon markup and bound to individual controls at run time.

Modes can be applied to a Ribbon Tab and Group.

Note  Modes can be applied to Button, SplitButton, and DropDownButton controls when hosted in the left column of the Application Menu.
 

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header uiribbon.h
DLL Mshtml.dll

See also

IUIFramework

Markup Elements

Reconfiguring the Ribbon with Application Modes

Windows Ribbon Framework Samples