SCF_CONTEXTMENU_EVENT Structure 

Occurs when a user selects an item from a context menu.

The SCF_CONTEXTMENU_EVENT Structure is identified by the enumeration value SCF_EVENT_IDS Enumeration, which is passed as the value of the in_dwEventId parameter of the ISideShowEvents::ApplicationEvent Method. Context menu navigation is treated as a separate event from other menu navigation, because additional parameters are required to communicate the context within which the navigation occurred.

Event Parameters:

The following table describes the parameters associated with the SCF_CONTEXTMENU_EVENT Structure.

Parameter

Type

Description

PreviousPage

CONTENT_ID

The content identifier of the page, of any type, on which the context menu was originally invoked.

TargetPage

CONTENT_ID

The content identifier of the page to which the user is navigating as a result of selecting an item in the context menu.

PreviousItemId

UINT32

The menu item identifier, if any, that was selected when the context menu was invoked.

This parameter is only valid if the previous page was a menu and the selected menu item had an identifier associated with it. Otherwise, this parameter is set to zero (0).

MenuPage

CONTENT_ID

The content identifier of the context menu.

MenuItemId

UINT32

The identifier value, if any, associated with the selected context menu item on which the navigation occurred. If no identifier is specified for the selected context menu item, this parameter will be set to zero (0).

C++ Parameter Structure:

The following C++ structure is defined in the file WindowsSideShow.h and shows how the parameters of the SCF_CONTEXTMENU_EVENT Structure are packaged to be passed to the ApplicationEvent method of the client-implemented ISideShowEvents interface. When this method is called, its in_pbEventData parameter points to a structure of the following form and its in_dwEventSize parameter is set to the size of this structure.

typedef struct tagSCF_CONTEXTMENU_EVENT
{
    CONTENT_ID  PreviousPage;
    CONTENT_ID  TargetPage;
    UINT32      PreviousItemId;
    CONTENT_ID  MenuPage;
    UINT32      MenuItemId;
} SCF_CONTEXTMENU_EVENT, *PSCF_CONTEXTMENU_EVENT;

See Also

Concepts

ISideShowEvents::ApplicationEvent Method
SCF_MENUACTION_EVENT Structure
SCF_NAVIGATION_EVENT Structure