为资源管理器创建RightClick菜单 [英] Creating RightClick Menu for Explorer

查看:178
本文介绍了为资源管理器创建RightClick菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人可以提供一些关于如何为驱动器创建右键单击菜单的示例文章。



这里是需要的:右键菜单将包含两个额外的东西,即:连接断开连接。我们可以使它有条件吗?我的意思是对某些条件驱动器将使连接启用(理想情况下,当没有连接),当连接时,它将禁用连接并启用断开连接。

解决方案

以下是所有相关文档。基本上你想创建一个COM对象实现IShellExtInit和IContextMenu。要注册它的驱动器,您可以在HKEY_CLASSES_ROOT\Drive下为它添加一个条目。如果MSDN文档有点密集,那么CodeProject上会有一个详细演练。 / p>

If some one can provide some sample articles on how to create Right Click Menu for Drives.

Here is what needed: The right click menu will contain two additional things, i.e: Connect and Disconnect. Can we make it conditional? I mean for some condition The drive will make the Connect enabled(Ideally when not connected) and when connected it will disable the connect and enable the Disconnect.

解决方案

Here is all the relevant documentation. Basically you want to create a COM object that implements IShellExtInit and IContextMenu. To register it for drives you would add an entry for it under HKEY_CLASSES_ROOT\Drive. If the MSDN documentation is a bit dense there is a detailed walkthrough on CodeProject.

这篇关于为资源管理器创建RightClick菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆