Creating RightClick Menu for Explorer

早过忘川 提交于 2019-12-08 08:32:52

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/3748936/creating-rightclick-menu-for-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!