|
-
March 3rd, 2004, 04:21 PM
#1
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.
-
March 3rd, 2004, 04:23 PM
#2
isn't that just executing the file??
Then your OS checks what program is used...
I can be wrong!
-
March 3rd, 2004, 04:38 PM
#3
Re: Open File Associated to an Application
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().
-
March 3rd, 2004, 05:22 PM
#4
-
March 4th, 2004, 05:11 PM
#5
Originally posted by vcstarter
ShellExecute Workds fine
Isn't that in the FAQ? I thought it was. Did you look there first?
-
March 6th, 2004, 03:42 PM
#6
Re: Open File Associated to an Application
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...
-
March 6th, 2004, 03:43 PM
#7
Originally posted by Sam Hobbs
Isn't that in the FAQ? I thought it was. Did you look there first?
Yes...he could have found the answer easily in the following FAQ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|