-
EnableShellOpen...
Hi,
I don't want to use EnableShellOpen and RegisterShellFileTypes() in my program. This is because I want my saved document to have a different icon from my program. But when I do not use this two functions, and manually set the entries in the registry, my saved document changes to the icon I want, but when I double-click my saved document in the Windows Explorer, my program is executed but does not open my saved document. Then after I close my program, it is the only time that a message box will be diplayed asying that the filename cannot be found or one of its components, check the path and filename is correct. Is there other things I need to do so that I can duplicate the functionalities that EnableShellOpen() and RegisterShellFileTypes() do, but without using them, aside from the entries in the registry? There's this thing with shipping a .reg file together with my program. But I don't know how to make one. Can you help me with this other alternative?
Thank you very much.
-
Re: EnableShellOpen...
when double clicking in explorer your program is started with command line argument for opening the document file. This is read out in processcmdline or something like that to a commandlineinfo structure. When you don't use EnableShellOpen the document will not be opened automatically.
I recommend tracing through the Command line parsing code, see if you only need to set a flag to automatically open document or use the command line information yourself to open it.
About the MsgBox at the end of your program execution, i don't know, may be a return value to explorer, so the message box created by explorer...
hope this helps
chris
chrislaw