Sorry to dig up an old thread, but I was searching for an answer to a similar problem, and this seems like as good a place as any to document what I found, so others may benefit. I had several ICON definitions in my RC file, and I couldn't figure out how to tell Code::Blocks which one to use as the icon for Windows Explorer. This was my code:
ID_ICON_KRAT_16 ICON "resource\\krat_16.ico"
ID_ICON_KRAT_32 ICON "resource\\krat_32.ico"
ID_ICON_KRAT_48 ICON "resource\\krat_48.ico"
I tried re-ordering the lines, and sought for some option in Code::Blocks to let me choose which icon would be used. Turns out I was looking in the wrong place. In my resdefs.hpp file I had this:
#define ID_ICON_KRAT_16 1000
#define ID_ICON_KRAT_32 1001
#define ID_ICON_KRAT_48 1002
Well, I finally tried changing the defines, and learned that the resulting EXE uses the icon with the lowest-numbered ID for its icon in Windows Explorer. I don't know if this is standard Windows behavior or just how C::B/mingw defaults, but now that I've figured it out, I'm a happy man. And maybe somebody else can benefit from my extraordinarily inefficient use of time