-
December 14th, 2008, 11:31 AM
#1
Running Application by File (New File extension)
Hi,
I have a dialog base application and this is required for my project to use.
I have used my custom base functions to register a new file extension let say .xyz . To limit the instance i have used Mutext technique ,
now i would like to know how can i retrieve the associated file name by which my application get triggered or Open? Since two instance cant work , how can i get trigered file information on my dialog....
Suppose if i click wolvorine.xyz then my application launch and start using this file (i couldnt get this file name and path yet).
Also suppose if my application is already running and i click on any file e.g. abc.xyz then i need to run that file on my existing running application...
Thanks in advance
-
December 14th, 2008, 11:37 AM
#2
Re: Running Application by File (New File extension)
to load "wolvorine.xyz" or any "*.xyz" on ur application u need to pass the path and exename in your application's command line
-
December 14th, 2008, 11:47 AM
#3
Re: Running Application by File (New File extension)
yes i can get command line , but how that abc.xyz file know to pass it self as a commandline aurgument to the current exe ??? any idea?
-
December 14th, 2008, 12:10 PM
#4
Re: Running Application by File (New File extension)
Originally Posted by Wolvorine
I have a dialog base application and this is required for my project to use.
REQUIRED? Who decided that this is a requirement?
You are trying to implement DDE for dialog based application. It is possible; however is it practical? You would have to erite a code supporting DDE conversation and that alone is not what you would want to do. Also, you would have to write a code to handle file opening, saving closing. In addition to all of the above you will realize that you want your application to have a menu, a toolbar and a status bar.
According to my MEMC postulate you would be much better off starting your application as SDI with CFormView derived class and in your case with doc/view architecture support.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
December 14th, 2008, 01:29 PM
#5
Re: Running Application by File (New File extension)
bro i dont need to implement entire DDE , i just need to get the file name and thats it. That file dont need to be save , edit etc. Just on click , need the file name to that application. I know its easy in SDI but my requirement still need a DIALOG..
Any idea guys????
-
December 14th, 2008, 01:47 PM
#6
Re: Running Application by File (New File extension)
Anyway it is solved....Thanks everyone
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
|