简体   繁体   English

Windows资源管理器上下文菜单

[英]Windows Explorer Context Menu

I want to add a context menu entry with C++. 我想用C ++添加上下文菜单项。 I've been searching but all I can find is some jackass trying to sell me some BS program that does it for me which is not what I am looking for. 我一直在搜索,但是我只能找到一些笨蛋试图向我出售一些为我做的BS程序,这不是我想要的。 I'm not looking for anything that uses .NET or Visual C++ either. 我也没有在寻找使用.NET或Visual C ++的任何东西。 I want the straight C++ way of doing this. 我想要直接的C ++方法。

You can add a right-click menu item that just runs a program, simply by registry editing. 您可以添加一个右键单击菜单项,仅通过注册表编辑即可运行程序。 No need to do shell extension for that. 无需为此进行外壳扩展。 Eg I used to have an extract icon thing (copy to clipboard), 例如,我以前有一个提取图标的东西(复制到剪贴板),

HKEY_CLASSES_ROOT\*\shell\copyIcon\=Copy icon to clipboard
HKEY_CLASSES_ROOT\*\shell\copyIcon\command="path to the program" %1

Cheers & hth., 干杯,……

A decent tutorial, ignore the jackass title, is available here . 此处提供了一个不错的教程,忽略了公驴标题。 This kind of shell programming requires COM, no escaping that. 这种shell编程需要COM,而无需逃避。 Trying to write COM code without MSVC support classes is character-building. 尝试在没有MSVC支持类的情况下编写COM代码是在构建字符。 But possible, as long as you know COM really well. 但是有可能,只要您对COM非常了解。

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

相关问题 将应用程序的选项添加到Windows资源管理器上下文菜单 - Adding options for your application to the Windows Explorer context menu Windows资源管理器右键单击文件和文件夹的上下文菜单 - Windows Explorer right click context menu for files and folders 如何显示 Windows 资源管理器上下文(右键单击)菜单? - How to show Windows Explorer context (right click) menu? 用于资源管理器上下文菜单的Shell扩展,图标打破了经典Windows设计中的对齐方式 - Shell extension for explorer context menu, icon breaks alignment in classic Windows design 在C#应用程序中使用3rd party上下文菜单(对于Windows资源管理器)? - Use 3rd party context menu (for Windows Explorer) within a C# application? 如何在Internet Explorer中显示我自己的上下文菜单 - How to show my own context menu in Internet Explorer 如何使用Qt在OS文件浏览器中添加上下文菜单项 - How to add a context menu entry in OS file explorer using Qt 如何使用IDocHostUIHandler :: ShowContextMenu修改Internet Explorer的上下文菜单? - How to modify context menu of internet explorer using IDocHostUIHandler::ShowContextMenu? 如何使用QT扩展资源管理器上下文菜单? - How can I extend the explorer context menu with QT? Windows上下文菜单,用于多个文件[C ++] - Windows context menu for multiple files [C++]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM