I'm making a rtf editor, and I set my application as the default .rtf files in Windows. The problem is, whenever I click any rtf file, it will open my application but it won't load the file automatically.
How can I do that ?
Printable View
I'm making a rtf editor, and I set my application as the default .rtf files in Windows. The problem is, whenever I click any rtf file, it will open my application but it won't load the file automatically.
How can I do that ?
You could try using the command line.
stephen1980
awesome I got it working, thanks a bunch ! :D
NG2 - how did you manage it? Did you use the command line route as suggested, or did you try something completely different?
It was fairly easy, I retrieved the command line, parsed the string using the " delimiter, then set the 3rd element as the "incoming file" global string. Then when the program launches it checks for the "incoming file" value, if it's equal to "" it doesn't do anything because it means it retrieved nothing, if it's diferent then it will load the file in the "incoming file" value.
By the way how do I automatically assign my program as the default program for the .rtf extension for example?
I tried the YASO object but it doesn't appear to work, in Vista at least it doesn't.
I guess I could do this with the registry object but I don't know how exactly.
You can use the Power System Object, which works quite nicely with my level editing program for assigning my extensions to my program.
Thanks, I tried but still no luck it doesn't seem to be doing anything. I think it might be because of Vista bue I'm not sure.
Is there any other way ?
It should work, I can't get icons to show with it, but when you double click the file does it open your program?
Well... You could do it manually. Right click an .rtf file, select open with, find your program and check "Make Default Program", then hit OK. You may need to browse for the program.
Also, thanks stephen1980, I had a similar problem at one point and dismissed this as impossible. :)
DMT that's a bit of a hassle for the user if he's making his own RTF editor...
Glad to be of service. :)Quote:
Originally Posted by DMT
stephen1980