Re: Shell Extension - Context Menu and GUID
From: Rob Kennedy (me3_at_privacy.net)
Date: 11/01/04
- Next message: Rob Kennedy: "Re: Comment on one of Rob Kennedy's (old) replies on timers."
- Previous message: Skybuck Flying: "Re: Strings start at index 1, Dynamic Arrays at index 0, Pchars start at index 0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Oct 2004 17:48:19 -0600
Damjan Vengušt wrote:
> 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.
Then you change the return value to IContextMenu.QueryContextMenu. You
*have* read the documentation for IContextMenu, haven't you?
> I guess each menu item should have it's own GUID.
No. Each shell-extension COM object gets its own GUID. You already have
your object written, so it already has a GUID.
> How to create COM object in this case.
You've already completed that step.
> 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 );
That line does not change.
> So If I add another Item, it would have GUID MyContextGUID_2.
No. Each object that implements IContextMenu has implementations for
three methods: GetCommandString, InvokeCommand, and QueryContextMenu.
-- Rob
- Next message: Rob Kennedy: "Re: Comment on one of Rob Kennedy's (old) replies on timers."
- Previous message: Skybuck Flying: "Re: Strings start at index 1, Dynamic Arrays at index 0, Pchars start at index 0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|