Context Menu - Shell Extension
From: Damjan Vengušt (damjan.vengust_at_guest.arnes.si)
Date: 10/31/04
- Next message: David Reeve: "Re: Dodgy header translation into Delphi?"
- Previous message: Martin Harvey (Demon account): "Re: Dodgy header translation into Delphi?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Oct 2004 01:59:26 +0200
Hey
So far I learned how to add an arbitrary number of Menu Items to Context
Menu. I made a little editor for customizing context menu.
I am able to run different applications by clicking on different menu
items, but all context menu items work on sam file type (txt for example).
I want that first item works on TXT files, second on DFM files,... in
general each item can work on different file type.
I guess this has something to do with my problem below (I am not sure).
Thanks,
Damjan
---------------------------------------------------------------------------------------------
Hey !
I made a simple shell extension program, which adds custom item in
context menu.
I understand how it works, when I have only one additional menu item.
What If I need to add more than one item.
I guess each menu item should have it's own GUID. How to create COM
object in this case.
This is how I create COM object for only one menu item. MyContextGUID is
GUID for my item.
TComObjectFactory.Create( ComServer, TMyContextMenu, MyContextGUID,
'', 'My Windows Shell Context Menu Extension', ciMultiInstance );
So If I add another Item, it would have GUID MyContextGUID_2.
Well, I managed to add two items, but as you can see (in code above)
only GUID of the first item is used. Is this OK.
So in general I would have to:
- create several menu items and GUIDs
- create some keys in registry (ShelEx\GUID1, ShellEx\GUID2, ....)
- create COM object with GUID1
Thanks for your reply,
Damjan
- Next message: David Reeve: "Re: Dodgy header translation into Delphi?"
- Previous message: Martin Harvey (Demon account): "Re: Dodgy header translation into Delphi?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|