Export (0) Print
Expand All

IUICommandHandler::Execute method

Responds to execute events on Commands bound to the Command handler.

Syntax


HRESULT Execute(
  [in]            UINT32 commandId,
  [in]            UI_EXECUTIONVERB verb,
  [in, optional]  const PROPERTYKEY *key,
  [in, optional]  const PROPVARIANT *currentValue,
  [in, optional]  IUISimplePropertySet *commandExecutionProperties
);

Parameters

commandId [in]

Type: UINT32

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

verb [in]

Type: UI_EXECUTIONVERB

The UI_EXECUTIONVERB or action that is initiated by the user.

key [in, optional]

Type: const PROPERTYKEY*

A pointer to a Property Key that has changed value. This parameter can be NULL.

currentValue [in, optional]

Type: const PROPVARIANT*

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

commandExecutionProperties [in, optional]

Type: IUISimplePropertySet*

A pointer to an IUISimplePropertySet object that contains Command state properties and property values, such as screen coordinates and list item indices. This parameter can be NULL.

Return value

Type: HRESULT

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

Remarks

Each Command in a View must be bound to a new or existing Command handler in the host application.

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

IUICommandHandler
Windows Ribbon Framework Samples

 

 

Community Additions

ADD
Show:
© 2014 Microsoft