Re: Creating a general (*) context menu shell item?
- From: "NewScience" <newscience83@xxxxxxxxxxxxxx>
- Date: Sat, 30 Sep 2006 11:05:10 -0400
I've done this before ... after a while it's pretty easy.
When you write you Context Menu handler, you request from the system a
unique CLSID. There is a freeware progam from MS that will provide this.
Search for CLSID generator.
Then when you add the Contenxt Menu handler to
'*'/shellex/ContextMenuHandlers, you add a unique name where it's default
value is that unique CLSID.
You must provide DLLRegister handler in your code as well as DLLUnregister
handler. This add/remove the entry from the registry.
Then each time a file is right-clicked, all '*' ContextMenuHandlers are
queried, passing a Yes/No back to the caller, and if Yes, the menu item name
is added to the list. Then the extension is checked for a
shellex/ContextMenuHandlers items, and handled the same way as '*'
ContextMenuHandlers items.
<JShrager@xxxxxxxxx> wrote in message
news:1159627330.088315.251250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to create my own shell-based shortcut menu item that comes up on
any file. This MSDN document:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/extending.asp
explains how to do this for a given file type. I've tried this and it
works, so I know that my .exe is right, and that I can hack this
correctly for a given (made up) file type (.foo)
This document:
http://windowssdk.msdn.microsoft.com/en-us/library/ms649567.aspx#registering
Explains how to create a general context handler, and how to hook it
into the context menu under the * (all types) type in
HKEY_CLASSES_ROOT.
BUT...
I can't find anything that tells you how to hook one's own shell-type
(.exe-type) context handler under * (all types), and I haven't been
able to figure it out by example (because all the default ones are
registered types!)
For example, the 1st doc above tells you to change the Default entry
for .foo in hkey_classes_root to the name of my special handler. And
that works... for a specific file type (.foo), but I obviously do NOT
want to change the Default key value for the * type!
So, how can I add a shell-type context menu hander for * (all types)?
Thanks in advance!
.
- References:
- Creating a general (*) context menu shell item?
- From: JShrager
- Creating a general (*) context menu shell item?
- Prev by Date: Re: Changing default folder locations??
- Next by Date: Re: Changing default folder locations??
- Previous by thread: Re: Creating a general (*) context menu shell item?
- Next by thread: Changing Multiple File/Folder Names
- Index(es):
Relevant Pages
|