Click to See Complete Forum and Search --> : File Association


May 7th, 1999, 09:39 PM
After a file is associated with an application, how does a program know that it
was called by the association and not by double clicking on it.

What i want to know is it i double click on a .dat file and it is associated with myprog.exe how does myprog.exe know that foobar.dat was double clicked and how does myprog.exe populate a (i.e.) List Box with the info from foobar.dat?

Thanks

Hardeep Singh
May 8th, 1999, 01:30 AM
...If you want your program to open an associated file when the file is double-clicked in Explorer, check out EnableShellOpen() and related functions.

...If you want your program to open any kind of file with its associated program, try FindExecutable() and ShellExecute().

May 8th, 1999, 01:22 PM
This and other information is contained in the m_lpCmdLine members of your application class.