Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Allows client objects of the IContextMenu3 interface to handle messages associated with owner-drawn menu items.
HRESULT HandleMenuMsg2(
UINT uMsg,
WPARAM wParam,
LPARAM lParam,
LRESULT *plResult
);
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.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
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) |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today