I'm looking to make a C++ program that accepts command line arguments for a file name, and opens a specific program to view the file.
My files are going to be .jpg, .pdf, and .tiff, so i basically want lets say you have this command line arguments:
program doc.pdf
it will know to open the file with acrobat reader
a few things:
this could probably be done by having the program execute the actual .exe file of the program and supply the file to it (somehow) .. but what if the program is in a different directory? say a user installed acrobat in a different directory .. windows itself knows what file extensions go with what programs .. would it be so hard to make a c++ program do it too (with the programs i specify)?
are there any viewers built in windows that basically any user would have to view .jpg files? i was thinking internet explorer but it always comes up with the full view and the address bar and that wouldnt work .. even supplying IE with the -k command line option doesnt work because you cant close the window .. and i think the windows image viewer is windows XP only
any help in this matter such as any C++ classes or functions that can help me do this .. or .. anything .. would be helpful thanks all
My files are going to be .jpg, .pdf, and .tiff, so i basically want lets say you have this command line arguments:
program doc.pdf
it will know to open the file with acrobat reader
a few things:
this could probably be done by having the program execute the actual .exe file of the program and supply the file to it (somehow) .. but what if the program is in a different directory? say a user installed acrobat in a different directory .. windows itself knows what file extensions go with what programs .. would it be so hard to make a c++ program do it too (with the programs i specify)?
are there any viewers built in windows that basically any user would have to view .jpg files? i was thinking internet explorer but it always comes up with the full view and the address bar and that wouldnt work .. even supplying IE with the -k command line option doesnt work because you cant close the window .. and i think the windows image viewer is windows XP only
any help in this matter such as any C++ classes or functions that can help me do this .. or .. anything .. would be helpful thanks all