I have small program which makes some chars from KBL to BRIM encoding system. It is simple. But I want to do sth like this: I have any KBL text file (.txt) and I click right button on it. AND THEN I FIND sth like 'KBL -> BRIM'.
I found a solution how to make functions in right click menu. But how can I make my script to get file's name?...
Let me ask you this, when you need to dry your hair do you use a hammer? or a hairdryer?
It sounds like you are trying to add a right click menu entry to the mouse in Explorer, in which case you are approaching this problem from the wrong direction.
If you are trying to add a right click function for use inside of your program that's a different story and you are better off using the Windows API for that.
kbw is right for that particular method however to do literaly what you are describing in Windows XP you'd be adding an entry to HKCR\*\shellex\ContextMenuHandlers which is why I asked you to clarify. This has more to do with understanding how Windows works then how C++ does.
EDIT: You'll also need to add another under HKCR\CLSID
I already added an entry to HKEY_CLASSES_ROOT\txtfile\shell\KBLtoBRIM. The entry is: "C:\Users\....Visual Studio 2010\Projects\KBL to BRIM\Debug\KBL to BRIM.exe" %1
But sth is wrong... I do not know what code shoude I entry to my program which I copied in my first messagy. What is missing from my program?
I did it like I said. But I think that my program does not understand what file.txt does it need to open. I need some how to give a name of txt file to my program by pressing right button