SHInvokeContextMenuCommand (Windows CE 5.0)

Send Feedback

This function invokes a command from a context menu. It issues the command in the extension that added it to the menu.

Syntax

BOOL SHInvokeContextMenuCommand(  HWND hwndOwner,  UINT idCmd,  HANDLE hCMExtensions);

Parameters

  • hwndOwner
    [in] Handle to the window that owns the menu, message boxes, and so on.
  • idCmd
    [in] Command ID to execute.
  • hCMExtensions
    [in] Handle to the context menu extensions abstraction object.

Return Values

This function returns TRUE if it is successful and FALSE if it fails.

Remarks

The extension will usually have at its disposal an abstraction interface from the application that it can use to obtain application-specific information. This will help make the extension more flexible and powerful. If an application abstraction is available, the shell will set it to the site of the extension using IObjectWithSite::SetSite. The extension should implement IObjectWithSite::SetSite.

Thus, when the user chooses a command from the extended menu and the application calls SHInvokeContextMenuCommand,which in turn calls IContextMenu::InvokeCommand, the extension can get a reference to the app abstraction interface by calling IObjectWithSite::GetSite.

Requirements

Pocket PC: Pocket PC 2000 and later
OS Versions: Windows CE 3.0 and later
Header: aygshell.h
Library: aygshell.lib

See Also

SHLoadContextMenuExtensions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.