NewMenu object
[This object is supported through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be unsupported in subsequent versions of Windows.]
Creates a New context menu for a Shell item.
Remarks
The New context menu is the same menu that a user can display by right-clicking the Windows desktop or Windows Explorer window, and selecting New from the drop-down list box.
Create this object by calling CoCreateInstance with a class identifier (CLSID) of CLSID_NewMenu and an IID of IID_IShellExtInit. Because the New context menu is invoked in the context of a folder rather than a particular folder item, initialize the object by calling IShellExtInit::Initialize with the ITEMIDLIST of the parent folder. You can then call QueryInterface to obtain pointers to the other interfaces that the object exports.
Interfaces Implemented
| IContextMenu |
The IContextMenu interface is called by the Shell to either create or merge a shortcut menu associated with a Shell object. |
| IContextMenu2 |
IContextMenu2 interface is used to either create or merge a shortcut menu associated with a certain object when the menu involves owner-drawn menu items |
| IContextMenu3 |
The IContextMenu3 interface is used to create or merge a shortcut menu associated with a certain object when the menu implementation needs to process the WM_MENUCHAR message. |
| IShellExtInit |
The IShellExtInit interface is used to initialize Shell extensions for property sheets, shortcut menus, and drag-and-drop handlers (extensions that add items to shortcut menus during nondefault drag-and-drop operations). |
| IObjectWithSite |
The IObjectWithSite interface provides a simple way to support communication between an object and its site in the container. |
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IID |
CLSID_NewMenu |