问题
I have read how to add a contextual menu though registry to all files or files according the extension. But how can I add a contextual menu that will work ONLY on files of a specific folder (for example on files of folder C:\contmenu)?
Can this be done?
Thanks a lot.
回答1:
If you're implementing a context menu shell extension, you get the path of the item in your IShellExtInit::Initialize() method. Then you can decide depending on the path whether to add your entries to the context menu or not.
It's not possible to register an extension just for a specific path though.
来源:https://stackoverflow.com/questions/9064272/contextual-menu-to-a-specific-folder