自定义多级 Windows 右键菜单

发布于 2024-07-14 17:36:16 字数 251 浏览 4 评论 0原文

我了解通过注册表等自定义右键菜单所需的过程。但是我需要能够进入多个级别,例如在 WinZip 等应用程序中。 这是一张图片,用于澄清我需要的内容

alt text http://img14.imageshack.us /img14/9658/multiplemenus.jpg

I understand the process needed to customize a right click menu going through the regedit etc. However I need to the ability to go multiple levels such as in applications like WinZip. Here's a picture for clarification of what I need

alt text http://img14.imageshack.us/img14/9658/multiplemenus.jpg

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

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

发布评论

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

评论(1

誰認得朕 2024-07-21 17:36:16

您需要编写一个 Shell 扩展; 这里有一份用托管代码 (C#) 编写的指南。 它将涉及进行一系列互操作并实现 Windows shell 将使用的 COM 接口,即 IShellExtInitIContextMenu

但是,有人可能会说,在托管代码中编写 Shell 扩展是 不建议; 它将强制 Windows 资源管理器加载 CLR(或任何使用标准 Windows“打开文件”对话框的应用程序) - 本机代码 (C++) 将是更好的选择。

You need to write a Shell Extension; there is a guide for writing one in managed code (C#) here. It will involve doing a bunch of interop and implementing COM interfaces that the windows shell will consume, namely IShellExtInit and IContextMenu.

However, one could argue that writing a Shell Extension in managed code is not advisable; it will force windows explorer to load the CLR, (or any app that uses the standard windows 'Open File' dialog) - native code (C++) would be a better choice for this.

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