User forums > Help
Questions about program icons in Win32 apps
(1/1)
ryurei:
OK, I have already tried everything I could find on MSDN. I have a Code::Blocks 8.02 project which is a Win32 Dialog project. I am trying to change the icon that the application uses as its icon (e.g. the icon used on botfigured oh the task bar and as the icon in the upper-left corner). I have tried adding lines to the resource.rc file, have tried adding lines to the .cpp file, and everything I have tried so far has utterly failed. If anyone knows how to do this, please let me know. Thanks.
PaulS:
I have waited to reply to this in the idle hope that someone more experienced would do so.
On Windows 7 I have been able to get icons in all the expected contexts by adding the following code to the end of the CTOR of the main class, after all the wxsmith generated code:
wxIcon FrameIcon;
FrameIcon.LoadFile("aaaa", wxBITMAP_TYPE_ICO_RESOURCE);
SetIcon(FrameIcon);
You should have an include for <wx/icon.h>. "aaaa" is the resource name.
While the windows details may not be appropriate fo a CodeBlocks forum I think the question of why exSmith doesn't generate something like this is valid. I have no idea what would be needed on non-windows platforms and that may be the proiblem
Jenna:
--- Quote from: ryurei on May 27, 2011, 09:45:18 am ---[...] which is a Win32 Dialog project.
[...]
--- End quote ---
--- Quote from: PaulS on May 28, 2011, 09:06:51 pm ---[...] after all the wxsmith generated code:
[...]
--- End quote ---
Win32 Dialog != wxWidgets
So it will not work.
And what's more it's not related to C::B.
General programming questions are not allowed in this forum/site.
So this topic violates our forum rules.
Topic locked !
Navigation
[0] Message Index
Go to full version