and here i am throwing a "not the exact version" of my problem, but if this is been solved, my problem is done.
Lets suppose i am building a application in c++ that will simply display the content of a text file.
I absolutely can make the app take the name of the file(to be opened) as a command line argument from the command prompt.
But What I want to do is: When a person double-clicks the text file(extention .txt) on windows explorer; My program should run showing the content of the file.
Tell me how to proceed;
I can very well right-click on the .txt files and choose "Open with" and select my program. But the problem is, how do I make my program respond to such actions.?