if the particular file type is associated with your program you can parse the command string that is passed to your program. I have a text editor that I made that checks arguments like this
char commandlinebuff [256];
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR CmdLine, int)
{
strcpy (commandlinebuff, CmdLine);
}
the window OS will send a command such as
"yourprogram image.bmp"
this is how I handle it from the main form.cpp
if (strlen (commandlinebuff))
{
strcpy (buff1, ExtractFilePath(commandlinebuff).c_str ());
if (strlen (buff1))
chdir (buff1);
strcpy (loadedfilename, commandlinebuff);
OpenFile (loadedfilename);
}
you must change the file associations in the os before the Os will open the file with your program.
look up the parameter list for winmain in the help
tomcruz.net