Windows 资源管理器上下文菜单

发布于 2024-09-29 19:25:21 字数 131 浏览 0 评论 0原文

我想用 C++ 添加一个上下文菜单条目。我一直在寻找,但我能找到的只是一些混蛋试图向我推销一些为我做这件事的 BS 程序,但这不是我想要的。我也不是在寻找任何使用 .NET 或 Visual C++ 的东西。我想要直接的 C++ 方法来做到这一点。

I want to add a context menu entry with 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. I'm not looking for anything that uses .NET or Visual C++ either. I want the straight C++ way of doing this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

狂之美人 2024-10-06 19:25:21

您只需通过注册表编辑即可添加仅运行程序的右键菜单项。无需为此进行外壳扩展。例如,我曾经有一个提取图标的东西(复制到剪贴板),

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

干杯&呵呵,

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. E.g. 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.,

情未る 2024-10-06 19:25:21

一个不错的教程,忽略这个混蛋标题,可以在这里找到。这种 shell 编程需要 COM,这是不可避免的。尝试在没有 MSVC 支持类的情况下编写 COM 代码是一种性格构建。但只要您非常了解 COM,就有可能。

A decent tutorial, ignore the jackass title, is available here. This kind of shell programming requires COM, no escaping that. Trying to write COM code without MSVC support classes is character-building. But possible, as long as you know COM really well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文