How to Create Cascading Menus with the IExplorerCommand Interface

Another option for adding verbs to a cascading menu is through IExplorerCommand::EnumSubCommands. This method enables data sources that provide their command module commands through the IExplorerCommandProvider interface to use those commands as verbs on a shortcut menu. In Windows 7 and later, you can provide the same verb implementation using the IExplorerCommand interface as you can with the IContextMenu interface.

Instructions

The following two screen shots illustrate the use of cascading menus in the Devices folder.

Screenshot that shows an example of a cascading menu in the devices folder.

screen shot showing an example of a cascading menu in the devices folder

Remarks

Note

Because IExplorerCommand supports in-process activation only, it is recommended for use by Shell data sources that need to share the implementation between commands and shortcut menus.

 

IExplorerCommand

IExplorerCommandProvider

IContextMenu