I can create a menu item in the Windows Explorer context menu by adding keys in the registry to HKEY_CLASSES_ROOT\Folder\shell.
我可以通过在注册表中将键添加到HKEY_CLASSES_ROOT \ Folder \ shell,在Windows资源管理器上下文菜单中创建一个菜单项。
How can I create submenu items to the just created menu item?
如何创建刚刚创建的菜单项的子菜单项?
2 个解决方案
#1
3
I believe anything non-trival you'll have to create a Context Menu Handler.
我相信你必须创建一个Context菜单处理程序。
You'll have to create a COM object that will create the menus and carry out the commands as they're clicked. I've only done this using C++ and COM. I'm not sure if there are easier ways to do this.
您必须创建一个COM对象,该对象将创建菜单并在单击时执行命令。我只用C ++和COM完成了这个。我不确定是否有更简单的方法来做到这一点。
#2
1
Use SubCommands "SubCommands"="[NameOfMenu]"
使用子命令“SubCommands”=“[NameOfMenu]”
Example for creating submenu for .TS files:
为.TS文件创建子菜单的示例:
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ts\shell\Encoding]
"MUIVerb"="Encoding video"
"SubCommands"="Encodex265Fade;EncodeTS2;watched"
"icon"="imageres.dll,-149"
"Position"=-
"MultiSelectModel"="Single"
"NeverDefault"=""
;"ExtendedSubCommandsKey"="Encode\\Fadein"
;"Icon"="C:\\Program Files (x86)\\CloudMe\\CloudMe\\favicon.ico"
More info: https://msdn.microsoft.com/en-us/library/windows/desktop/hh127431(v=vs.85).aspx
更多信息:https://msdn.microsoft.com/en-us/library/windows/desktop/hh127431(v = vs。85).aspx
#1
3
I believe anything non-trival you'll have to create a Context Menu Handler.
我相信你必须创建一个Context菜单处理程序。
You'll have to create a COM object that will create the menus and carry out the commands as they're clicked. I've only done this using C++ and COM. I'm not sure if there are easier ways to do this.
您必须创建一个COM对象,该对象将创建菜单并在单击时执行命令。我只用C ++和COM完成了这个。我不确定是否有更简单的方法来做到这一点。
#2
1
Use SubCommands "SubCommands"="[NameOfMenu]"
使用子命令“SubCommands”=“[NameOfMenu]”
Example for creating submenu for .TS files:
为.TS文件创建子菜单的示例:
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ts\shell\Encoding]
"MUIVerb"="Encoding video"
"SubCommands"="Encodex265Fade;EncodeTS2;watched"
"icon"="imageres.dll,-149"
"Position"=-
"MultiSelectModel"="Single"
"NeverDefault"=""
;"ExtendedSubCommandsKey"="Encode\\Fadein"
;"Icon"="C:\\Program Files (x86)\\CloudMe\\CloudMe\\favicon.ico"
More info: https://msdn.microsoft.com/en-us/library/windows/desktop/hh127431(v=vs.85).aspx
更多信息:https://msdn.microsoft.com/en-us/library/windows/desktop/hh127431(v = vs。85).aspx