IUIFramework::SetUICommandProperty method

Sets a command property, value, or state.

Syntax


HRESULT SetUICommandProperty(
  [in] UINT32         commandId,
  [in] REFPROPERTYKEY key,
  [in] PROPVARIANT    value
);

Parameters

commandId [in]

Type: UINT32

The ID for the Command, which is specified in the Markup resource file.

key [in]

Type: REFPROPERTYKEY

The property key of the command property, value, or state.

value [in]

Type: PROPVARIANT

The property, value, or state.

Return value

Type: HRESULT

Returns S_OK if successful, otherwise an error value from the following list.

ValueDescription
HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) The property, value, or state does not support IUIFramework::SetUICommandProperty. They may support being set through invalidation only.
E_FAILThe operation failed.

 

Remarks

A limited number of property keys can be set using IUIFramework::SetUICommandProperty. For those properties where IUIFramework::SetUICommandProperty returns HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), IUIFramework::InvalidateUICommand should be used instead.

For more information on how to set a property key for a specific control, see the Windows Ribbon Framework Control Library page for that control.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Product

Windows UI

Header

Uiribbon.h

IDL

Uiribbon.idl

DLL

Mshtml.dll

See also

IUIFramework
Windows Ribbon Framework Samples

 

 

Community Additions

ADD
Show: