简体   繁体   English

在Windows资源管理器上下文菜单中添加分隔符(不在子菜单中)

[英]Add a separator in the Windows Explorer context menu (not in a submenu)

I have found that "CommandFlags"=dword:00000040 will add a separator below an entry, though only to a submenu (under the "subcommands"="" string). 我发现“CommandFlags”= dword:00000040会在条目下面添加一个分隔符,但仅限于子菜单(在“subcommands”=“”字符串下)。 Example here . 这里的例子。

Is there a way to add a separator in the main context menu? 有没有办法在主上下文菜单中添加分隔符?

The example I am using: 我正在使用的示例:

[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Delete With Rimraf]
@="Delete With Rimraf"
"CommandFlags"=dword:00000040

This gives no separator. 这没有分隔符。

This example feature a separator after and before the item, this entry is for VirusTotal Uploader 此示例在项目之前和之前具有分隔符,此条目用于VirusTotal Uploader

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\vtuploader]
@="Send to VirusTotal"
"Icon"="C:\\Program Files\\VirusTotalUploader2\\VirusTotalUploader2.2.exe,0"
"SeparatorBefore"=""
"SeparatorAfter"=""

For other applications loaded over shellex it's not possible to add separator over registry, the injected dll add/remove separator itself, you need then to change the dll code and recompile it to achieve what you want here is an example with notepad++ https://github.com/notepad-plus-plus/notepad-plus-plus/pull/3092/commits 对于通过shellex加载的其他应用程序,无法在注册表上添加分隔符,注入的dll添加/删除分隔符本身,然后您需要更改dll代码并重新编译它以实现您想要的内容,这是一个使用notepad ++ https://的示例github.com/notepad-plus-plus/notepad-plus-plus/pull/3092/commits

InsertMenu(hMenu, nIndex, MF_STRING | MF_BYPOSITION, idCmd++, m_szMenuTitle);

Hi I'm the author of the blog entry you refer to ( https://blog.sverrirs.com/2014/05/creating-cascading-menu-items-in.html ) 嗨,我是您所引用的博客条目的作者( https://blog.sverrirs.com/2014/05/creating-cascading-menu-items-in.html

Your options to manipulate the main context menu are quite restricted. 操作主上下文菜单的选项非常有限。 The MSDN documentation indicates that you might only be able to use the ECF_SEPARATORBEFORE (0x20) value for top-level items. MSDN文档表明您可能只能将ECF_SEPARATORBEFORE (0x20)值用于顶级项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM