Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jeancf on February 28, 2007, 11:31:00 am

Title: Application icon wxWidgets/Windows
Post by: jeancf on February 28, 2007, 11:31:00 am
Hi,

I have written a wxWidgets application under MS Windows. I would like to compile it with a custom icon for the application (i.e. I want my own icon visible in the file manager on the .exe file) but I can't find out how to do it with CodeBlocks.

Can you let me know where to specify that option?

Thanks,

/~jc
Title: Re: Application icon wxWidgets/Windows
Post by: Biplab on February 28, 2007, 11:45:23 am
Did you use wxWidgets wizard?

If, yes open the resource.rc file in C::B. Change the following line
Code
aaaa ICON "wx/msw/std.ico"
To
Code
aaaa ICON "<Path_to_your_icon>/<Your_icon>.ico"

If not, then create a file with the above content and above name and add it to your project.

Regards,

Biplab :)
Title: Re: Application icon wxWidgets/Windows
Post by: jeancf on February 28, 2007, 01:05:37 pm
Thanks! It worked.

I thought it was an option that needed to be set in the C::B project. I am a bit puzzled by the "aaaa" though. what does that correspond to?

/~jc
Title: Re: Application icon wxWidgets/Windows
Post by: Biplab on February 28, 2007, 01:08:56 pm
AFAIK, if there are multiple icons in a resource file Windows sets the first Icon as Program Icon. Windows determines this by Icon Names (Alphabetically). Thus aaaa will ensure that this comes first in search and thus I've used that peculiar one. ;)

Regards,

Biplab
Title: Re: Application icon wxWidgets/Windows
Post by: jeancf on February 28, 2007, 01:32:45 pm
It makes sense. Thanks a lot for your help.