Author Topic: Questions about program icons in Win32 apps  (Read 4534 times)

ryurei

  • Guest
Questions about program icons in Win32 apps
« on: May 27, 2011, 09:45:18 am »
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.

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Questions about program icons in Win32 apps
« Reply #1 on: May 28, 2011, 09:06:51 pm »
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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Questions about program icons in Win32 apps
« Reply #2 on: May 28, 2011, 09:25:48 pm »
[...] which is a Win32 Dialog project.
[...]
[...] after all the wxsmith generated code:
[...]

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 !