Author Topic: Application icon wxWidgets/Windows  (Read 5469 times)

Offline jeancf

  • Multiple posting newcomer
  • *
  • Posts: 20
Application icon wxWidgets/Windows
« 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

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Application icon wxWidgets/Windows
« Reply #1 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 :)
Be a part of the solution, not a part of the problem.

Offline jeancf

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Application icon wxWidgets/Windows
« Reply #2 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

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Application icon wxWidgets/Windows
« Reply #3 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
Be a part of the solution, not a part of the problem.

Offline jeancf

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Application icon wxWidgets/Windows
« Reply #4 on: February 28, 2007, 01:32:45 pm »
It makes sense. Thanks a lot for your help.