开发者

How Can I Add An Item To Folders Menu Of Right Click?

I need to add an item to folders right click menu when clicked send folder addres开发者_运维百科s to my app. how can i do it? it'll be a great help if you describe how to make popup menu for that item and how can i use images for items? something like WinRAR.... and what about file types? same ways? thank you.


What you want to do is create a Shell Extension. A starting point is this article: Delphi: Windows Shell Extensions. Essentially you need to create a COM component that implements IContextMenu, IContextMenu2 or IContextMenu3 and expose it to Explorer by registering it appropriately.

There's an example at delphi3000.com, but it's only available via the google cache at present.


To add new options to the right-click context menu, you'll need to set it up as a shell extension and register it with Windows. Here's an article describing the basic principles for it.

As for how to register a file type with Windows, you can find a mimimal but well-commented Delphi example here.


Depending on your version of Delphi, you may still be able to use the TurboPower ShellShock components http://sourceforge.net/projects/tpshellshock/ to make your life a bit easier :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜