views:

35

answers:

2

I want to add a context menu entry with C++. I've been searching but all I can find is some jackass trying to sell me some BS program that does it for me which is not what I am looking for. I'm not looking for anything that uses .NET or Visual C++ either. I want the straight C++ way of doing this.

+1  A: 

A decent tutorial, ignore the jackass title, is available here. This kind of shell programming requires COM, no escaping that. Trying to write COM code without MSVC support classes is character-building. But possible, as long as you know COM really well.

Hans Passant
A: 

You can add a right-click menu item that just runs a program, simply by registry editing. No need to do shell extension for that. E.g. I used to have an extract icon thing (copy to clipboard),

HKEY_CLASSES_ROOT\*\shell\copyIcon\=Copy icon to clipboard
HKEY_CLASSES_ROOT\*\shell\copyIcon\command="path to the program" %1

Cheers & hth.,

Alf P. Steinbach