Skip to content

Latest commit

 

History

History
92 lines (69 loc) · 4.19 KB

nf-shobjidl_core-icontextmenu3-handlemenumsg2.md

File metadata and controls

92 lines (69 loc) · 4.19 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shobjidl_core.IContextMenu3.HandleMenuMsg2
IContextMenu3::HandleMenuMsg2 (shobjidl_core.h)
Allows client objects of the IContextMenu3 interface to handle messages associated with owner-drawn menu items.
HandleMenuMsg2
HandleMenuMsg2 method [Windows Shell]
HandleMenuMsg2 method [Windows Shell]
IContextMenu3 interface
IContextMenu3 interface [Windows Shell]
HandleMenuMsg2 method
IContextMenu3.HandleMenuMsg2
IContextMenu3::HandleMenuMsg2
_win32_IContextMenu3_HandleMenuMsg2
shell.IContextMenu3_HandleMenuMsg2
shobjidl_core/IContextMenu3::HandleMenuMsg2
shell\IContextMenu3_HandleMenuMsg2.htm
shell
d258edb1-9489-4cdf-b398-16af37a1cb38
12/05/2018
HandleMenuMsg2, HandleMenuMsg2 method [Windows Shell], HandleMenuMsg2 method [Windows Shell],IContextMenu3 interface, IContextMenu3 interface [Windows Shell],HandleMenuMsg2 method, IContextMenu3.HandleMenuMsg2, IContextMenu3::HandleMenuMsg2, _win32_IContextMenu3_HandleMenuMsg2, shell.IContextMenu3_HandleMenuMsg2, shobjidl_core/IContextMenu3::HandleMenuMsg2
shobjidl_core.h
Shobjidl.h
Windows
Windows 2000 Professional, Windows XP [desktop apps only]
Windows 2000 Server [desktop apps only]
Shobjidl.idl
Shell32.dll (version 4.71 or later)
Windows
19H1
IContextMenu3::HandleMenuMsg2
shobjidl_core/IContextMenu3::HandleMenuMsg2
c++
APIRef
kbSyntax
COM
Shell32.dll
IContextMenu3.HandleMenuMsg2

IContextMenu3::HandleMenuMsg2

-description

Allows client objects of the IContextMenu3 interface to handle messages associated with owner-drawn menu items.

-parameters

-param 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.

-param wParam

Type: WPARAM

Additional message information. The value of this parameter depends on the value of the uMsg parameter.

-param lParam

Type: LPARAM

Additional message information. The value of this parameter depends on the value of the uMsg parameter.

-param 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.

-returns

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.

Note  If IContextMenu3 is not implemented, there is no guarantee that IContextMenu2 will be called in its place. In some cases, the absence of IContextMenu3 is determined and then the process is halted.