Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Allows client objects of the IContextMenu3 interface to handle messages associated with owner-drawn menu items.
Syntax
HRESULT HandleMenuMsg2(
UINT uMsg,
WPARAM wParam,
LPARAM lParam,
LRESULT *plResult
);
Parameters
uMsg
Type: UINT
The message to be processed. In the case of some messages, such as WM_INITMENUPOPUP, WM_DRAWITEM, WM_MENUCHAR, or WM_MEASUREITEM, the client object being called may provide owner-drawn menu items.
wParam
Type: WPARAM
Additional message information. The value of this parameter depends on the value of the uMsg parameter.
lParam
Type: LPARAM
Additional message information. The value of this parameter depends on the value of the uMsg parameter.
plResult
Type: LRESULT*
The address of an LRESULT value that the owner of the menu will return from the message. This parameter can be NULL.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
IContextMenu3::HandleMenuMsg2 generally replaces IContextMenu2::HandleMenuMsg, and is called when IContextMenu determines that IContextMenu3 is supported and one of the supported messages (see uMsg) has been received. However, in some cases, IContextMenu2::HandleMenuMsg is still called. Context menu hosts may dispatch menu messages through either or both methods. Consequently, if a Shell extension implements both IContextMenu2::HandleMenuMsg and IContextMenu3::HandleMenuMsg2, it must be prepared for menu messages to arrive through either method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
DLL | Shell32.dll (version 4.71 or later) |