Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows Right-Click on a File - how do I create a cascading submenu?

Posted on 2003-11-16
8
Medium Priority
?
242 Views
Last Modified: 2010-05-18
Hello everyone,

I'm working on several programs which are to be installed on several users PCs (Win2k and WinXP). What happens is that the users receive files (typically .txt files) and they want to be able to right-click on the file and choose a menu option for what is to be done with it (ie to choose which program is to run).

I can easily create right-click options for the menu (through the registry). However there are several programs/options and the right-click menu is starting to look somewhat crowded. I would like to be able to consolidate them, so that the process would be something like:

(right-click) -> Convert Data -> (particular data conversion needed)

I've looked at some systems which do what I am wanting to do (WinZip and WinRar) - they appear to use a .dll to do this. Is there some method of getting Windows to do it, or is a dll/program required?

Thanks!
WilliamV
0
Comment
Question by:WilliamV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:Insolence
ID: 9762450
I don't this it's possible William... but if you do manage to find out, I'd love to know!  I do this very same thing on some of my machines.  =)  It'd be sweet to let me have subcategories.  =P

 - Insolence
0
 
LVL 8

Expert Comment

by:Wojciech Duda
ID: 9764371
Unfortunately, this seems impossible without a shell extension handler.

This page in the MSDN:

http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/context.asp

shows no way of adding cascaded menus.

It seems you need a shell extension handler (the dll you mentioned). I'll try and look for a free one for you - info can be found here:

http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_extending/extending.asp
0
 
LVL 8

Expert Comment

by:Wojciech Duda
ID: 9764401
Another idea would be a small workaround - create shortcuts in the "Send To" folder - you can use this cascading menu this way.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 8

Accepted Solution

by:
Wojciech Duda earned 1200 total points
ID: 9764426
I found a guide to programming an shell extension handler for bitmapped and cascaded context menus, this should help:

http://www.codeguru.com/shell/CascadingMenus.html
0
 

Author Comment

by:WilliamV
ID: 9766761
Thank you mcwojtekk! That information seems to be exactly what I need. You get the points for sure!

After reading through the code I'm going to have a go at writing a "generic" context menu handler which gets the menu info from an ini-file of some type. That way I can customise it for any computer system that it needs to be put on, now and future, rather than recoding for every system. If you want that for yourself Insolence, I will happily give it to you (assuming that I can manage it!).

Thanks once more!
WilliamV
0
 
LVL 5

Expert Comment

by:Insolence
ID: 9767115
Heh, William, if you take the time to write that, I'd love to test it for ya and give you some feedback, and of course, would love to use it.  =P I looked at the codeguru example, it looks very clean.  I hate windows programming, I'm a linux junkie in that aspect, but it doesn't look too bad.  =)  William, if you do manage to get somethin' running, my e-mail is in my profile.  =)  Take care, and nice find mcwojtekk.  =)

 - Insolence
0
 
LVL 8

Expert Comment

by:Wojciech Duda
ID: 9769970
Glad to help and thanks for the points.
0
 

Author Comment

by:WilliamV
ID: 9790912
First-cut is heading your way, Insolence - hope it helps you too!

WilliamV
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question