IUICommandHandler::UpdateProperty method

Responds to property update requests from the Windows Ribbon framework.

Syntax

HRESULT UpdateProperty(
  UINT32            commandId,
  REFPROPERTYKEY    key,
  const PROPVARIANT *currentValue,
  PROPVARIANT       *newValue
);

Parameters

commandId

Type: UINT32

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

key

Type: REFPROPERTYKEY

The Property Key to update.

currentValue

Type: const PROPVARIANT*

A pointer to the current value for key. This parameter can be NULL.

newValue

Type: PROPVARIANT*

When this method returns, contains a pointer to the new value for key.

Return Value

Type: HRESULT

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

Remarks

This method should be allowed to return before any subsequent calls to the Ribbon framework are made.

The values of Command properties, such as UI_PKEY_Enabled or UI_PKEY_Label, are set through calls to SetUICommandProperty or InvalidateUICommand.

Requirements

   
Windows version Windows 7 [desktop apps only] Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header uiribbon.h
DLL Mshtml.dll

See Also

IUICommandHandler

Windows Ribbon Framework Samples