Called by MSHTML to display a shortcut menu.SyntaxHRESULT ShowContextMenu( DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved ); ParametersdwID [in] DWORD that specifies the identifier of the shortcut menu to be displayed. This identifier is a bitwise shift of the value 0x1 by the shortcut menu values (e.g., CONTEXT_MENU_DEFAULT) defined in Mshtmhst.h. 0x2 value of (0x1 << CONTEXT_MENU_DEFAULT) 0x4 value of (0x1 << CONTEXT_MENU_CONTROL) 0x8 value of (0x1 << CONTEXT_MENU_TABLE) 0x10 value of (0x1 << CONTEXT_MENU_TEXTSELECT) 0x30 value of (0x1 << CONTEXT_MENU_ANCHOR) 0x20 value of (0x1 << CONTEXT_MENU_UNKNOWN) ppt [in] Pointer to a POINT structure containing the screen coordinates for the menu. pcmdtReserved [in] Pointer to the IUnknown of an IOleCommandTarget interface used to query command status and execute commands on this object. pdispReserved [in] Pointer to an IDispatch interface of the object at the screen coordinates specified in ppt. This allows a host to differentiate particular objects to provide more specific context. Return ValueReturns one of the following values:S_OK Host displayed its own user interface (UI). MSHTML will not attempt to display its UI. S_FALSE Host did not display any UI. MSHTML will display its UI. DOCHOST_E_UNKNOWN Menu identifier is unknown. MSHTML may attempt an alternative identifier from a previous version.
POINT *ppt,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved
);
ParametersdwID
[in] DWORD that specifies the identifier of the shortcut menu to be displayed. This identifier is a bitwise shift of the value 0x1 by the shortcut menu values (e.g., CONTEXT_MENU_DEFAULT) defined in Mshtmhst.h.
0x2
value of (0x1 << CONTEXT_MENU_DEFAULT)
0x4
value of (0x1 << CONTEXT_MENU_CONTROL)
0x8
value of (0x1 << CONTEXT_MENU_TABLE)
0x10
value of (0x1 << CONTEXT_MENU_TEXTSELECT)
0x30
value of (0x1 << CONTEXT_MENU_ANCHOR)
0x20
value of (0x1 << CONTEXT_MENU_UNKNOWN)
ppt
[in] Pointer to a POINT structure containing the screen coordinates for the menu.
pcmdtReserved
[in] Pointer to the IUnknown of an IOleCommandTarget interface used to query command status and execute commands on this object.
pdispReserved
[in] Pointer to an IDispatch interface of the object at the screen coordinates specified in ppt. This allows a host to differentiate particular objects to provide more specific context.
Return ValueReturns one of the following values:S_OK Host displayed its own user interface (UI). MSHTML will not attempt to display its UI.
S_FALSE Host did not display any UI. MSHTML will display its UI.
DOCHOST_E_UNKNOWN Menu identifier is unknown. MSHTML may attempt an alternative identifier from a previous version.