IUIFramework::GetUICommandProperty method (uiribbon.h)

Retrieves a command property, value, or state.

Syntax

HRESULT GetUICommandProperty(
  [in]  UINT32         commandId,
  [in]  REFPROPERTYKEY key,
  [out] PROPVARIANT    *value
);

Parameters

[in] commandId

Type: UINT32

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

[in] key

Type: REFPROPERTYKEY

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

[out] value

Type: PROPVARIANT*

When this method returns, contains the property, value, or state.

Return value

Type: HRESULT

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

Value Description
HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) The property, value, or state does not support IUIFramework::GetUICommandProperty.
E_FAIL The operation failed.

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

Windows Ribbon Framework Samples