UI_EVENTPARAMS_COMMAND structure (uiribbon.h)

Contains information about a Command associated with a event.

Syntax

typedef struct _UI_EVENTPARAMS_COMMAND {
  UINT             CommandID;
  PCWSTR           CommandName;
  UINT             ParentCommandID;
  PCWSTR           ParentCommandName;
  UINT             SelectionIndex;
  UI_EVENTLOCATION Location;
} UI_EVENTPARAMS_COMMAND;

Members

CommandID

The ID of the Command directly related to the event, which is specified in the markup resource file.

CommandName

The Command name that is associated with CommandId.

ParentCommandID

The ID for the parent of the Command, which is specified in the markup resource file.

ParentCommandName

The Command name of the parent that is associated with CommandId.

SelectionIndex

SelectionIndex is used only when a UI_EVENTTYPE_CommandExecuted has been fired in response to the user selecting an item within a ComboBox or item gallery. In those cases, SelectionIndex contains the index of the selected item. In all other cases, it is set to 0.

Location

One of the values from UI_EVENTLOCATION.

Remarks

The Command identified by CommandID and CommandName depend upon which event has occurred: for a UI_EVENTTYPE_TabActivated event, they identify the tab; for a UI_EVENTTYPE_MenuOpened event, they identify the menu; for UI_EVENTTYPE_CommandExecuted events, they identify the command being executed; and for UI_EVENTTYPE_TooltipShown events, they identify the Command that owns that tooltip.

ParentCommandID and ParentCommandName identify the parent command (if any) of the command associated with this event. If there is no parent, then ParentCommandID is zero and ParentCommandName is an empty string.

Requirements

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

See also

OnUIEvent

Structures

UI_EVENTPARAMS