Context Menu - Shell Extension

From: Damjan Vengušt (damjan.vengust_at_guest.arnes.si)
Date: 10/31/04


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



Relevant Pages

  • Shell Extension - Context Menu and GUID
    ... I made a simple shell extension program, ... I guess each menu item should have it's own GUID. ... TComObjectFactory.Create(ComServer, TMyContextMenu, MyContextGUID, ... '', 'My Windows Shell Context Menu Extension', ciMultiInstance); ...
    (alt.comp.lang.borland-delphi)
  • Re: MOSS 2007 - search service error
    ... Context: Application 'guid here' ... The filename or extension is too long. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Shell Extension - Context Menu and GUID
    ... > I made a simple shell extension program, which adds custom item in ... > context menu. ... *have* read the documentation for IContextMenu, ... Each shell-extension COM object gets its own GUID. ...
    (alt.comp.lang.borland-delphi)
  • Error -2147319765
    ... this context. ... As a side note I tried calling GetRecordInfoFromGuids() ... initially using __uuidofas the fifth argument but the compiler ... so I packed my GUID into a GUID struct and passed that. ...
    (microsoft.public.vc.atl)
  • Re: Right-click - new text document missing...
    ... >>>Customize Context Menus ... >>> Explorer, and click the File Types tab. ... Highlight the desired file type, ... you can specify a new name for this file type (to be listed in ...
    (microsoft.public.windowsxp.general)