PDA

View Full Version : Windows & Visual Studio: associating icon to file type



qtUser500
31st July 2009, 19:22
My application is developed on Windows with QT 4.4.3 and Visual Studio 2008
I want to associate a file type (.abc) with an icon (.png or .ico), how can I do this from Visual Studio or Qt?
As a result all files of type .abc have the concerned icon next to their file names.

Any pointers will be appreciated.
Thanks.

franz
31st July 2009, 19:53
File type association is done by windows, not by VS or Qt. You should probably look into how you should fix this using windows or if you want to do it from your program, how you should handle the information in your windows registry (possibly using QSettings).

qtUser500
31st July 2009, 21:18
I tried using the Setup project in Visual Studio. Here one can associate the file types to the icons and names.
The solution built successfully, but I guess the file step is to do the associations in the registry.

Can anyone tell me if I am heading in the right direction?

qtUser500
4th August 2009, 21:16
Is there anyone who can help me with this?

I need to know how to embed the icon into the .exe file.
I tried using the Setup Project in Visual Studio, but it didn't do the job. Am I missing something?

Thanks in advance.

qtUser500
5th August 2009, 16:08
I figured this one out.
Am posting the answer for others who might run into this issue in the future:

In Visual Studio, need to open the executable (File/ Open/ File..), and add the icon's in the icon folder. Remember this needs to be done on the final .exe after the build is compiled and ready.

Lesiok
5th August 2009, 17:32
Is there anyone who can help me with this?

I need to know how to embed the icon into the .exe file.
I tried using the Setup Project in Visual Studio, but it didn't do the job. Am I missing something?

Thanks in advance.

Look at this (http://doc.trolltech.com/4.5/appicon.html)