Επεξεργασία

Κοινή χρήση μέσω


IContextMenu2 interface (shobjidl_core.h)

Exposes methods that either create or merge a shortcut (context) menu associated with a Shell object. Extends IContextMenu by adding a method that allows client objects to handle messages associated with owner-drawn menu items.

Inheritance

The IContextMenu2 interface inherits from IContextMenu. IContextMenu2 also has these types of members:

Methods

The IContextMenu2 interface has these methods.

 
IContextMenu2::HandleMenuMsg

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

Remarks

This interface also provides the methods of the IContextMenu interface, from which it inherits.

Note  Windows Vista and later. Prior to Windows Vista this interface was declared in Shlobj.h.
 

When to Implement

Implement IContextMenu2 if your namespace extension or shortcut menu handler needs to process one or more of the following messages. These messages are forwarded to IContextMenu2—through the HandleMenuMsg method—only if a QueryInterface call for an IContextMenu2 interface pointer is successful, indicating that the object supports this interface.

When to Use

Applications do not normally call this interface directly.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)