Does anyone know how one would go about creating a "custom" file type? (Such as Macromedia Flash's .swf.. or quicktime's .mov)

Also.. once I have created a custom file type... how would I make sure that my file is always associated with a given icon (that I will create).. and will not appear with the unknown file format icon?

Thank you.

(Please note: I'm using Win32)

Thank you for your post.. it's at least helped me to understand how to get an image associated with a file extension..

I've actually learned how to create a custom file extension with the fopen function.

However.. now I have a new problem. Not only do I want to be able to create a custom file extension.. but I would also like my file extension to do things.. when it is open.. Ex: When a .swf file is opened.. whatever was in that file.. is displayed on the screen. I would like to have it that when a person opens my custom file.. music starts playing (or something of the like)


You have to associate the file extension with some program. Here is how its done in VB. If there is no program that can read the file then you will have to write the program yourself.

Thank you so much.. your links have helped me out greatly.