为资源管理器创建右键菜单
如果有人可以提供一些有关如何创建驱动器右键菜单的示例文章。
这是需要的:右键菜单将包含两个附加内容,即:连接和断开连接。我们可以把它当作有条件的吗?我的意思是,在某些情况下,驱动器将使连接启用(理想情况下未连接时),连接后它将禁用连接并启用断开连接。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里是所有相关文档。基本上,您想要创建一个实现 IShellExtInit 和 IContextMenu 的 COM 对象。要为驱动器注册它,您需要在 HKEY_CLASSES_ROOT\Drive 下为其添加一个条目。如果 MSDN 文档有点密集,CodeProject 上有详细演练。
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.