Page 1 of 1

Setting the application icons ...

Posted: Mon Jul 20, 2009 9:25 pm
by h.a.n.d
Hi,

I'm back again with a rather advanced question.

How do you set the application icons?


I've read about resources and the .rc compiler and that you can compile the icons into your exe.
That works so far for me, but Windows doesn't use the icon resources correctly!

Here is what I've done:

I have an my.ico file with 12 different icons 16x16, 32x32, 48x48 in all suported color formats.

My resources.rc file looks like this:

Code: Select all

id ICON "path/to/my.ico"
I compile the resources into my .exe at compile time:

windres -I../../_wxWidgets_2.6.2_minGW/include -i ../src/resources.rc -o ../res/resources.o

Linker extra options:
res/resources.o

The resources get compiled correctly into the .exe and Windows shows me my 48x48 icon in the explorer and my 16x16 icon as taskbar icon.
But the default icon for the window caption and for the alt+tab is used!?

What did I do wrong?

Thanks for the help!!!
- h.a.n.d

Posted: Tue Jul 21, 2009 1:18 pm
by JeroenP
See the irrlicht source code:

Code: Select all

		// if there is an icon, load it
		wcex.hIcon = (HICON)LoadImage(hInstance, "irrlicht.ico", IMAGE_ICON, 0,0, LR_LOADFROMFILE); 
source: CIrrDeviceWin32.cpp line 327-328


Jeroen (first post :))