Handles messages for shell shortcut menus with owner drawn items.
Syntax
HRESULT WINAPI SHForwardContextMenuMsg (
IUnknown* pUnk,
UINT uMsg,
WPARAM wParam,
LPARAM lParam,
LRESULT* pResult,
BOOL useIContextMenu2
)
Parameters
- pUnk
- Pointer to an interface that implements IContextMenu3 or IContextMenu2
- uMsg
- Forwarded message identifier
- wParam
- Message WPARAM
- lParam
- Message LPARAM
- pResult
- Optional pointer to an LRESULT that receives the return value of of the message processing
- useIContextMenu2
- TRUE to allow the function to fallback to IContextMenu2->HandleMenuMsg if pUnk doesn't support the IContextMenu3 interface
Return Value
S_OK/S_FALSE on success, standard COM error code otherwise
Remarks
This function is simply a wrapper for querying a IContextMenu3 interface from pUnk and calling it's HandleMenuMsg2 method, doing the same for IContextMenu2 and HandleMenuMsg on failure.
If useIContextMenu2 is TRUE and pUnk doesn't support IContextMenu3 then the return value is S_FALSE on success and *pResult is always set to 0 if pResult is not NULL.
This function is also known as _SHForwardContextMenuMsg@24.