Shell Extension Context Menu Sample
An Explorer context menu is the menu that pops up when you right-click on a file or folder form within Explorer or My Computer or any other standard file browse dialog. You see them for apps like WinZip, virus scanners, image viewers, etc. But, there is surprisingly little documentation on them, and the examples that are out there are mostly pretty poor.
I've taken the basic SHELLEX sample from the MSDN and filled in the missing parts, added multi-threading and a progress dialog and packaged it for you to use for your own applications.
The source package includes a lengthy readme file that explains the inner workings of the code, how to add your own changes, how to debug it and the things you'll need to know if you want to distribute the final product. Please read the notes on running and debugging - shell extensions are not normal apps, you'll need to do some special setup steps before you can run or debug them.
A friendly warning:
If you've never seen a COM DLL before, this code may be confusing. But trust me,
there are only a few sections that you will have to modify in order to add your own code.
Support:
I don't know anything about the other kinds of extensions that are possible : property pages,
namespace extensions, etc. Don't ask.
Have fun!
This is distributed as a VC5 project. I don't know if it will work on VC4 or VC6.

Comments
uninstall doesn't delete from Aproveed in WINNT
Posted by Legacy on 10/22/2000 12:00amOriginally posted by: hope
hi
Replyuninstall doesn't remove the key from aproved in WINNT
why?
Isn't there any class wrapper for this ?
Posted by Legacy on 10/21/2000 12:00amOriginally posted by: Mohammed Hamed
I would like to know this:
ReplyIsn't there any class wrapper for this ?
I would like to create a context menu handler shell extension without dealing with low-level details and registery editing
How to add colored icons to this pop-up menu items
Posted by Legacy on 10/05/2000 12:00amOriginally posted by: Aslam
Hi,
This code work fine with the back and white icons, but I wanna add colored icons to the menu items which get pop up when u right click on a file in explorer.. Can any help me in this..
Thanks
Aslam
ReplyHow to do it with VB5?
Posted by Legacy on 04/29/2000 12:00amOriginally posted by: Fido
How can i add a personalized option to the system context menus in the file manager using VB5?
ReplyContext Menu in Printers View
Posted by Legacy on 04/11/2000 12:00amOriginally posted by: nistor sorin
How can I add a new item in the context menu for an installed printer.(StartMenu->Settings->Printers)
Thanks, Sorin
ReplyHow to do it with ATL
Posted by Legacy on 04/04/2000 12:00amOriginally posted by: Greg Keogh
I'm a newcomer to ATL and COM, and I've been trying to write a context menu handler via the VC++ 6 ATL wizards. I've studied the ShellExt example from Microsoft, but it doesn't use ATL. Does anyone have a sample of an extension written with ATL? I've just posted a query on this matter in the win32.programmer.ole/ui newsgroups.
-
Replythanks
Posted by huangze on 12/09/2008 01:34amthanks
ReplyHow to limit to only one file class?
Posted by Legacy on 01/22/2000 12:00amOriginally posted by: Florian Zschocke
Thanks for the good example. Just what I was looking for. I even got it to compile under Borland C++ without many problems.
ReplyBut one question remains. If I register the dll for the class '*' it works. but if I register it for only the class e.g. '.mp3' I don't get my contest menu extension when right-clicking on a file with extension .mp3. The entries in the registry are correct.
How to hook IE5 favorites to my web browser application?
Posted by Legacy on 12/02/1999 12:00amOriginally posted by: Vivek
Hi Everybody,
I have made a simple application which hosts Microsoft Web Browser component. Im taking care of all the events and related things and it works same like the IE5. But the problem is Im not able to figure out how to add the IE5 favorite items to my favorite items?
Any help would be appreciated?
Vivek.
ReplyBuilding fully functional applications using Shell Namespace Extension
Posted by Legacy on 09/24/1999 12:00amOriginally posted by: Michael H. Pan
ReplySendTo addition to Context Menu
Posted by Legacy on 08/29/1999 12:00amOriginally posted by: S. Vinoj Kumar
How to add SendTo as a sub-menu to the context menu. A sample MSDN application called ENUMDESK adds context menu items for its own version of Windows Explorer (such as Open, QuickView, etc.), however it does not add SendTo to the items. It appears as Empty.
ReplyLoading, Please Wait ...