如何添加项目到Windows资源管理器内容菜单在delphi? [英] How to add item to windows explorer content menu in delphi?

查看:117
本文介绍了如何添加项目到Windows资源管理器内容菜单在delphi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows资源管理器内容菜单(对于所有文件类型)中创建菜单项,点击后将打开我的应用程序并将所选文件名传递给它。有没有任何教程?我知道有ShellPlus组件可用,但有点过时。

I would like to create menu item in windows explorer content menu (for all file types) which after click will open my application and pass the selected file name to it. Is there any tutorial for this ? I know there is ShellPlus component available but it's a bit outdated.

推荐答案

注册表

这个方法很简单,因为它是添加一些注册表项。不利的是,你不能把任何逻辑。您可以阅读此处这里是Delphi中的一个简单示例。如果您使用DDE执行菜单项,您将得到更多的控制。有关Delphi示例,请参见此处

This method is easy since it comes down to adding some registry keys. The downside is that you can't put any logic in it. You can read about it here and here a simple example in Delphi. You get a bit more control if you are using DDE to execute the menu items. See here for a Delphi example.

Shell扩展程序

此方法有一点工作,但您可以从代码完全控制上下文菜单。您必须编写一个DLL,实现 IContextMenu (或其他),并使用Windows资源管理器注册该DLL。您可以阅读这里。您已经提到了 Shell +

This method is a bit more work, but you can completely control the context menu from code. You would have to write a DLL, implement IContextMenu (or others) and register the dll with Windows Explorer. You can read about it here. You already mentioned Shell+.

这篇关于如何添加项目到Windows资源管理器内容菜单在delphi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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