Open File Associated to an Application
I know how to use WinExec or CreateProcess to run an application. I can also use CreateProcess to open a specific file name within an anpplication.
What I want, is to open a file that is associated with a specific application, but I don't know the command line or the application installation directory.
For insance, assume that .txt is associated with another application instead of notepad. Now, when I doubleclick on a text file, is opened by that application rather than notepad.
All that I want, opening a file with the application that file is associated, but I don't know the application.
Re: Open File Associated to an Application
Quote:
Originally posted by vcstarter
All that I want, opening a file with the application that file is associated, but I don't know the application.
That can be done with ShellExecute() or ShellExecuteEx().
Re: Open File Associated to an Application
Quote:
Originally posted by vcstarter
I know how to use WinExec or CreateProcess to run an application.
Note, that you should not use 'WinExec()' any longer since it is only provided for 16-bit compatibility...