Shell Extension Context Menu Sample

Environment: VC5.0, Win95/98/NT

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.

Downloads

Download source - 33 Kb



Comments

  • uninstall doesn't delete from Aproveed in WINNT

    Posted by Legacy on 10/22/2000 12:00am

    Originally posted by: hope

    hi
    uninstall doesn't remove the key from aproved in WINNT
    why?

    Reply
  • Isn't there any class wrapper for this ?

    Posted by Legacy on 10/21/2000 12:00am

    Originally posted by: Mohammed Hamed

    I would like to know this:
    Isn'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

    Reply
  • How to add colored icons to this pop-up menu items

    Posted by Legacy on 10/05/2000 12:00am

    Originally 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

    Reply
  • How to do it with VB5?

    Posted by Legacy on 04/29/2000 12:00am

    Originally posted by: Fido

    How can i add a personalized option to the system context menus in the file manager using VB5?

    Reply
  • Context Menu in Printers View

    Posted by Legacy on 04/11/2000 12:00am

    Originally posted by: nistor sorin

    How can I add a new item in the context menu for an installed printer.(StartMenu->Settings->Printers)

    Thanks, Sorin

    Reply
  • How to do it with ATL

    Posted by Legacy on 04/04/2000 12:00am

    Originally 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.

    • thanks

      Posted by huangze on 12/09/2008 01:34am

      thanks

      Reply
    Reply
  • How to limit to only one file class?

    Posted by Legacy on 01/22/2000 12:00am

    Originally 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.
    But 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.

    Reply
  • How to hook IE5 favorites to my web browser application?

    Posted by Legacy on 12/02/1999 12:00am

    Originally 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.

    Reply
  • Building fully functional applications using Shell Namespace Extension

    Posted by Legacy on 09/24/1999 12:00am

    Originally posted by: Michael H. Pan

    I have been working on a project that fully uses Shell
    
    Namespace extension, with a full GUI merging with existing
    Exploer (property pages, context menu, help, drag and drop, etc.).

    Our application even goes futher to have sub namespace DLLs
    that are managed by a "master" Shell Namespace DLL, the
    framework we built can be used in any other projects that
    are hierarchical in nature, good examples are database
    viewer, file structure viewer, etc. If you have some
    questions on any of these, I may be able to help you.

    Reply
  • SendTo addition to Context Menu

    Posted by Legacy on 08/29/1999 12:00am

    Originally 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.

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Companies undertaking an IT project need to find the right balance between cost and functionality. It's important to start by determining whether to build a solution from scratch, buy an out-of-the-box solution, or a combination of both. In reality, most projects will require some system tailoring to meet business requirements. Decision-makers must understand how much software development is enough and craft a detailed implementation plan to ensure the project's success. This white paper examines the different …

  • According to technology research firm Gartner, cloud computing will become the bulk of new IT spend by 20161. By the end of 2017, Gartner predicts that nearly half of large enterprises will have hybrid cloud deployments1. Learn how you can use these trends to your advantage by offering cloud and hybrid data solutions to your customers.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date