Shell pop-up menu item hint on status bar

I have written a program (in Delphi) which has an option to put itself on the pop-up menu or "shell shortcut" menu that is displayed when mouse button 2 is clicked on a drive or folder in Windows Explorer and in other Windows shell utilities such as My Computer, drive and folder windows and open/save dialog boxes.

To do this, my program inserts an entry into the registry for each of 'Drive' and 'Directory' as follows:

    HKEY_CLASSES_ROOT\ddd\shell\Folder &Sizer\command\
    (Default)\'ppp\FOLSIZER.EXE "%1"'

where ddd = 'Drive' or 'Directory', ppp = path of the program's folder.  Folder Sizer (FOLSIZER.EXE) is the name of my program.

In addition to the command to be executed for the menu item, which is shown in the above registry entry, I would also like to insert a hint or description to appear on the status bar of the My Computer window and of drive and folder windows.  Without this, the default is simply to show the application name as shown in the registry key.  Unfortunately, it actually shows literally as 'Folder &Sizer', including the '&', which looks silly!  (The '&' is not shown on the pop-up menu:  instead it functions to underline the 'S' and make 'S' the hot key.)

So how can I replace the default hint with a more suitable alternative, such as 'Analyse the drive with Folder Sizer'?

(No comments about my non-American spelling of 'Analyse', please.  :-))
SimonORorkeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tma050898Commented:
Unfortunately, as far as I know there is no way to do what you want with a static registry entry. I believe you need to install a context menu handler and implement the IContextMenu interface.

Take a look at the registry entires for "QuickView". As you can see, they've done what you did in order to get their entry on the context menu. However, I could not locate the actual text that you see when you mouse over the "Quick View" menu entry. Same thing for WinZip. Therefore, I can only summise that you need to write a context menu handler if you want "help text". In addition, another piece of info that makes me thing that you need to implement the IContextMenu interface to set the "help text" is the fact that IContextMenu has a method called GetCommandString that can be used to retrieve the "help text".

Hopefully, this will at least get you pointed in the right direction. If this isn't specific enough, maybe someone else can shed more light on how this works...
0
SimonORorkeAuthor Commented:
I have heard of context menu handlers and I did wonder if I would have to use one.  But I cannot find anything about them in Win 32 Programmer's Reference or in my Delphi references.  Delphi does have a TRegistry object, but it clearly does not provide any facilities specifically for context menu handlers.  So I have no idea how to go about making one.  But I am willing to learn.  I suppose I would need a book on the registry to work out how to do it myself.  So, tma's proposed answer is not enough, and regrettably I must throw the question open to other experts.  Hopefully someone can give me enough info to do the job.

This is one of those questions where it is difficult to know whether to put it in the Windows Programming topic, as I have done, or the Delphi topic.  If the answer involves using MFC or OWL C++ classes, it will not help me.  On the other hand, I know enough about C to understand code samples of API calls embedded in C.  In any case, I do not need general info on how to put things in the registry.  Delphi's TRegistry makes that easy.  I just need to know more about context menu handlers.  

Alternatively, there is the possibility that I can do what I want with a static registry entry after all, in which case I shall forgo the pleasure of tackling context menu handlers for now!
0
SimonORorkeAuthor Commented:
Adjusted points to 200
0
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

SimonORorkeAuthor Commented:
Having looked into this a bit more, I have decided not to do it.  I would need to write a DLL, which means I would have to bundle it and my little freeware program in a proper install program, which, I found, would make the whole thing five times the size and therefore less attractive for people to download.  It is not worth it for such a small improvement.  

Besides, I found the explanation of how to do context menu handlers in a big fat book, "The Delphi Developer's Guide", and it takes several pages.  Not the sort of thing that would be easy to work through in Experts' Exchange, by the look of it.

So, tma, if you would like to repeat your proposed answer, I will give you some points for pointing me in the right direction and close the question.  Thanks for your help.
0
tma050898Commented:
Simon,

You're very welcome.

I agree that writing a context menu handler isn't a trival task. Actually, I was kinda hoping that you would find that I was wrong and that there was a way of having "help text" with a static registry entry. However, everything that I had read also pointed to needing a handler.

Cheers,
Tom

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tma050898Commented:
GREAT!!! I answer your question and you don't like the fact that you're going to actually have to code something and you give me a 'D'. Hey, buddy, it's not my fault you don't have the time to to code this. I took over an hour researching this for you attempting to find an easier solution. Don't hold it against me that MickySoft makes this hard. The answer I came up with was perfectly valid.

Tom Archer
0
linda101698Commented:
Under the guidelines of Experts Exchange, an answer is a specific response to a specific question.  If tma gave a response that was reasonable for the question you asked then he has answered your question.

The guidelines for what is a question and answer are located at the following URL for your review.

http://www.experts-exchange.com/info/qna.htm

Linda Gardner
Customer Service @ Experts Exchange
0
SimonORorkeAuthor Commented:
Sorry, I stand corrected.  I am new to this.  Please submit your answer again for regrading, tma, or let me know whatever else I need to do to rectify your anwser's grade.
0
tma050898Commented:
Thanks, Simon. We all make mistakes. However, it takes someone with class to accept erring and attempt to correct it. Unfortunately, I can not "resubmit" my answer because it has already been accepted and graded. However, if you wish, you can contact Linda (linda@experts-exchange.com) and she can adjust the points.

Tom Archer

0
linda101698Commented:
I'll post a question for tma so I can add some quality points to his account.  Look for the question in the topic area,

Linda
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.