I want to add an item into the Desktop context menu (the menu you see when you right-click on an empty space on the Windows Desktop).
我想在桌面上下文菜单中添加一个项目(右键单击Windows桌面上的空白区域时看到的菜单)。
Something like Catalyst Control Center in this screenshot:
像这个屏幕截图中的Catalyst Control Center:
I know how to add items to files' and folders' context menus through registry, but the Desktop seems to work differently: I didn't even find the text in the registry.
我知道如何通过注册表向文件和文件夹的上下文菜单添加项目,但桌面似乎工作方式不同:我甚至没有在注册表中找到文本。
So, how can I add a new item into the Desktop menu and how can I associate some code with it?
I think the solution is language independent, if it's not, I'd appreciate any code that helps.
那么,如何在桌面菜单中添加新项目以及如何将某些代码与其关联?我认为解决方案与语言无关,如果不是,我会感谢任何有用的代码。
2 个解决方案
#1
2
Such a handler must be registered in HKCR\Directory\Background, instead of usual locations like HKCR\Directory, HKCR\Folder, etc.
这样的处理程序必须在HKCR \ Directory \ Background中注册,而不是像HKCR \ Directory,HKCR \ Folder等常用位置。
Check out Creating Shell Extension Handlers in MSDN.
在MSDN中查看创建Shell扩展处理程序。
#2
1
There's a series of articles on CodeProject that details writing Shell Extensions and is very good:
CodeProject上有一系列关于编写Shell Extensions的文章,非常好:
#1
2
Such a handler must be registered in HKCR\Directory\Background, instead of usual locations like HKCR\Directory, HKCR\Folder, etc.
这样的处理程序必须在HKCR \ Directory \ Background中注册,而不是像HKCR \ Directory,HKCR \ Folder等常用位置。
Check out Creating Shell Extension Handlers in MSDN.
在MSDN中查看创建Shell扩展处理程序。
#2
1
There's a series of articles on CodeProject that details writing Shell Extensions and is very good:
CodeProject上有一系列关于编写Shell Extensions的文章,非常好: