Re: Shell Extension - Context Menu and GUID

From: Rob Kennedy (me3_at_privacy.net)
Date: 11/01/04


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


Relevant Pages

  • Context Menu - Shell Extension
    ... So far I learned how to add an arbitrary number of Menu Items to Context ... I made a little editor for customizing context menu. ... but all context menu items work on sam file type. ... I guess each menu item should have it's own GUID. ...
    (comp.lang.pascal.delphi.misc)
  • Re: how can I get the Role id (Guid)?
    ... unless you have created your own custom ... Gregory A. Beamer ... I wonder how to get the Guid id for a role, lets say I have created the ... I ask because I'm asked to create a message system on the website, ...
    (microsoft.public.dotnet.framework.aspnet)
  • 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: reading user defined properties using EWS
    ... You just need to use need to include something to retreive your custom ... property unless you have set your own GUID they should be in the Public ... PathToExtendedFieldType path = new PathToExtendedFieldType; ... to read the custom form in inbox using exchange web service, ...
    (microsoft.public.exchange.development)