Well I am writting a basic text editor and it can open files and save it blah blah blah.. But when I try to open a file using the "open with" option my app just opens, the file isn't being displayed.. Any idea on how to make this work??
Posted on 2006-02-18 09:03:16 by lone_samurai5
call GetCommandLine(A/W) and parse the command line.

When you drop a file on your exe or when you choose "open with", the command line should be somehing like:

"C:\my programs\MySuperApp.exe" D:\documents\document1.txt

The command-line string is zero-terminated.

Get the document's name and use your internal 'load' function to open it.

I suggest you using the "GetCommandLineW" "CommandLineToArgvW" pair.
Posted on 2006-02-18 09:40:25 by ti_mo_n
The command line has the target file in it, you will have to use GetCommandLine and parse the command line to find your file name. Once you have the filename you can then open it normally as if the user had selected it. MASM32 has a command line parser called GetCL that can be used for this.
Posted on 2006-02-18 22:24:30 by donkey
Thanx a lot guys.. :D
Posted on 2006-02-18 22:38:27 by lone_samurai5