Comments

: Hi all;: : How can associate my file type to my application?: : That is, when i double-click on the file, my application will run and do whatever is necessary with that file.: : Also, how can i associate an icon with my file type? Is there something to do with registry?: : Thanx in advance...: You need to create two register keys, all of which are in the HKEY_CLASSES root. First you need to create key with the extension (including the dot). That key must have a standard value with a description of the file-type.The second key in the HKEY_CLASSES describes that file type. Inside that key you need to create a key-path called "shellopencommand", who's standard value is set to the command line, to open the file. A second subkey called "DefaultIcon" will give the icon associated with the file-type.A good example is the .zip file-type. Just look it up in your registry.Also be sure to add the necessary code to your program to handle the command line parameters.

: : Hi all;: : : : How can associate my file type to my application?: : : : That is, when i double-click on the file, my application will run and do whatever is necessary with that file.: : : : Also, how can i associate an icon with my file type? Is there something to do with registry?: : : : Thanx in advance...: : : You need to create two register keys, all of which are in the HKEY_CLASSES root. First you need to create key with the extension (including the dot). That key must have a standard value with a description of the file-type.: The second key in the HKEY_CLASSES describes that file type. Inside that key you need to create a key-path called "shellopencommand", who's standard value is set to the command line, to open the file. A second subkey called "DefaultIcon" will give the icon associated with the file-type.: A good example is the .zip file-type. Just look it up in your registry.: Also be sure to add the necessary code to your program to handle the command line parameters.:

i have created a new key called .myf, which is the extension of my file type. Then i assigned values to (Default) and Content Type.

But that's all i could do. I could'nt manage to associate my icon and application with the file type.Is there something to do with the PersistentHandler key?

: : : Hi all;: : : : : : How can associate my file type to my application?: : : : : : That is, when i double-click on the file, my application will run and do whatever is necessary with that file.: : : : : : Also, how can i associate an icon with my file type? Is there something to do with registry?: : : : : : Thanx in advance...: : : : : You need to create two register keys, all of which are in the HKEY_CLASSES root. First you need to create key with the extension (including the dot). That key must have a standard value with a description of the file-type.: : The second key in the HKEY_CLASSES describes that file type. Inside that key you need to create a key-path called "shellopencommand", who's standard value is set to the command line, to open the file. A second subkey called "DefaultIcon" will give the icon associated with the file-type.: : A good example is the .zip file-type. Just look it up in your registry.: : Also be sure to add the necessary code to your program to handle the command line parameters.: : : : i have created a new key called .myf, which is the extension of my file type. Then i assigned values to (Default) and Content Type.: : But that's all i could do. I could'nt manage to associate my icon and application with the file type.: Is there something to do with the PersistentHandler key?: : Thanx...: : Nope. In the descriptive key you need to create a key called DefaultIcon, whose Default value is the associated icon. A nice example of this is the HKEY_CLASSES_ROOTWinZipDefaultIcon key.