I am writing a picture viewer to reside in "Program Files" directory. I then right click on a picture file in any other directory and use "Open with" to optionally chose my viewer. I know how to do all this. But how do I send to my program the path of the directory of the picture that opened the program?
I finally sussed this out. The above link did it, but it won't work in debug mode of course. You have to first build and copy your release to somewhere like the desktop. Then right click on a picture somewhere, choose "Open With", and browse for your program.