到特定文件夹的上下文菜单 [英] Contextual Menu to a Specific Folder

查看:93
本文介绍了到特定文件夹的上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了如何通过注册表向所有文件或扩展名中的文件添加上下文菜单. 但是,如何添加仅在特定文件夹的文件(例如,文件夹C:\ contmenu的文件)上起作用的上下文菜单?

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)?

可以做到吗?

非常感谢.

推荐答案

如果要实现上下文菜单外壳扩展,则可以在

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.

这篇关于到特定文件夹的上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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