Advertisement

file opening

Started by June 18, 2002 10:57 PM
4 comments, last by foogoo 22 years, 6 months ago
i am making an mdi app that makes a .jnl file, how can i make it so when u click on the file it opens the file in the mdi app like if you click a word document and it opens in word..
------------------------------http://foogoo.web-trash.com (under construction)
Have the program completed first off.

Click on the file and you will get a popup that says something like "Please select program to open the file" and you will get a list of program .exe''s...

Click browse and look for your .exe, then select ''Always use this program to open this file type'' and your all set

~Dwarf
----------[Development Journal]
Advertisement
...Or register the file type with the Windows registry - the proper and professional way to do it. Check MSDN for details on .reg files.
ok i will try those.. and for the first reply, i have done that yet it only opens the editor like i opened it from the exe.. and i will try both and hopefully it works!



[edited by - foogoo on June 19, 2002 12:44:17 PM]
------------------------------http://foogoo.web-trash.com (under construction)
quote: Original post by foogoo
...and for the first reply, i have done that yet it only opens the editor like i opened it from the exe...

That''s because your application doesn''t parse its command-line parameters. Under most platforms, your application entry point is main or one of its variants which takes a few parameters - the most common are int argc, the number of arguments or argument count and char * argv[], argument values an array of null-terminated strings containing the actual arguments themselves. You need to check for the existence and number of these arguments in your main and respond accordingly.

Under Windows, the entire command line is passed to your WinMain as LPSTR lpCommandLine (next-to-last parameter).
ok thank u a ton
------------------------------http://foogoo.web-trash.com (under construction)

This topic is closed to new replies.

Advertisement