C++ Customize Context Menus

Hi

I have been working in C++ Console applications (VC++ editor). Now, I wish to customize my context menus using Console application (not sure whether it is possible) or by using Windows Application.

Basically, I need to create a separator in the Right Click Context menus and a new menu item with some sub menu items in the context menu. Could any one update me a sample source code to accomplish my requirement with C++. For ex, while right click a folder a menu named 'Testing' should be available. And the menu 'Testing' has 2 sub menus 'Test1' and 'Test2'.

Also I need to add a overlay image for a particular folder. Is it possible with C++. If possible, pls let me know the sample source code.

If not, please update me is there any registry change to accomplish my requirements.

Thanks in Advance,

Rahul
IIRC, I don't think you can.

Console applications aren't supposed to know about GUI stuff, so MS designed the Windows Console so that it "doesn't have" a Window Procedure. Hence, you cannot override it (since it doesn't exist) and catch WM_SYSTEM messages, and you cannot modify the window menu (since it doesn't exist).

Of course it really is in there somewhere, but you (the programmer) cannot access it.

Sorry.
Hi,

thanks for ur reply..

I hope most of the Antivirus software and sample applications like 'Winzip', 'Winmerge' added their menus in the Folders right click menu.

From your post, I hope it can not be done by console application. Ok.... Then is there any other way , say by using MFC application or any registry change.

I tried to add it manually via registry by adding a new key in 'HKEY_CLASSES_ROOT\Folder\shell'. This list my new option in the menu. But I am not sure how to add a line seperator there.

Please let me know, if I need to send any further details.
I'm not sure I understood you correctly the first time.

Are you saying that you want to update Explorer's context menu so that your application can be executed?

The instructions for modifying the registry can be found here
http://www.petri.co.il/add_command_prompt_here_shortcut_to_windows_explorer.htm

Just put your program's information in instead of the command prompt's.

Good luck!
Topic archived. No new replies allowed.