![](/img/trans.png)
[英]Add a separator in the Windows Explorer context menu (not in a submenu)
[英]How to add submenu items to the Windows Explorer context menu?
我可以通過在注冊表中將鍵添加到HKEY_CLASSES_ROOT \\ Folder \\ shell ,在Windows資源管理器上下文菜單中創建一個菜單項。
如何創建剛剛創建的菜單項的子菜單項?
我相信你必須創建一個Context菜單處理程序 。
您必須創建一個COM對象,該對象將創建菜單並在單擊時執行命令。 我只用C ++和COM完成了這個。 我不確定是否有更簡單的方法來做到這一點。
使用子命令“SubCommands”=“[NameOfMenu]”
為.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"
更多信息: https : //msdn.microsoft.com/en-us/library/windows/desktop/hh127431(v = vs。85).aspx
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.