Hi everyone.
My main windown inherits from wxApp.
How can I change the icon off my app?
Thanks
Set an icon to my app
Set an icon to my app
Excuse my poor english
-
- Earned some good credits
- Posts: 146
- Joined: Sun Nov 26, 2006 7:37 am
- Location: Tennessee, USA
- Contact:
Re: Set an icon to my app
It is different for different OS's. For windows you need a resource file. (appResources.rc or something )ne01982 wrote:Hi everyone.
My main windown inherits from wxApp.
How can I change the icon off my app?
Thanks
My resource file
Code: Select all
aaaa ICON xpbn.ico
#include <wx/msw/wx.rc>
Code: Select all
mainFrame->SetIcon( wxICON(aaaa) ); // To Set Application Icon
JS
OS Windows XP Pro
Compiler MinGW 3.4.5
wxWidgets 2.8.7 (Unicode : Monolithic : Release)
IDE Code::Blocks (Latest Release)
RAD wxFormBuilder (Latest Release)
Compiler MinGW 3.4.5
wxWidgets 2.8.7 (Unicode : Monolithic : Release)
IDE Code::Blocks (Latest Release)
RAD wxFormBuilder (Latest Release)
-
- Earned some good credits
- Posts: 109
- Joined: Wed Sep 13, 2006 10:15 am
- Location: Gebesee, Germany
- Contact:
Hi,
you can do also sth like that, it is nearly the same solution, JS posted before:
and somewhere in OnInit() or the frame constructor:
XPM files save the picture data in sth like a structure, and icon_xpm is its name.
Best regards, BigFreeze
you can do also sth like that, it is nearly the same solution, JS posted before:
Code: Select all
#include "pics/icon.xpm"
Code: Select all
SetIcon(icon_xpm);
Best regards, BigFreeze
It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds. (Samuel Adams)
OS: Windows XP Pro
Compiler: VC++ 8.0
wxWidgets: 2.8.0
IDE: VC++
OS: Windows XP Pro
Compiler: VC++ 8.0
wxWidgets: 2.8.0
IDE: VC++
-
- Earned some good credits
- Posts: 146
- Joined: Sun Nov 26, 2006 7:37 am
- Location: Tennessee, USA
- Contact:
Do you get that to work in Windows? I am unable to. I wish all the OS's could accept XPM's. It's a bit annoying trying to get each OS's icons worked out.BigFreeze wrote:Hi,
you can do also sth like that, it is nearly the same solution, JS posted before:
and somewhere in OnInit() or the frame constructor:Code: Select all
#include "pics/icon.xpm"
XPM files save the picture data in sth like a structure, and icon_xpm is its name.Code: Select all
SetIcon(icon_xpm);
Best regards, BigFreeze
Thanks,
JS
OS Windows XP Pro
Compiler MinGW 3.4.5
wxWidgets 2.8.7 (Unicode : Monolithic : Release)
IDE Code::Blocks (Latest Release)
RAD wxFormBuilder (Latest Release)
Compiler MinGW 3.4.5
wxWidgets 2.8.7 (Unicode : Monolithic : Release)
IDE Code::Blocks (Latest Release)
RAD wxFormBuilder (Latest Release)
-
- Earned some good credits
- Posts: 109
- Joined: Wed Sep 13, 2006 10:15 am
- Location: Gebesee, Germany
- Contact:
.Do you get that to work in Windows? I am unable to. I wish all the OS's could accept XPM's. It's a bit annoying trying to get each OS's icons worked out
Yes, it works fine with Windows and Linux. I have no problems.
I supposed, the acception of XPM's is a part, wxWidgets has to manage and not the OS. Maybe I'm wrong, but it seems, that XPM work better on different platforms than other types of images like JPEG, because it stores the data in sth like a structure. I think, to handle this kind of storage is part of the programs (picture editing software, I use GIMP) and not the OS.
Best regards, BigFreeze
It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds. (Samuel Adams)
OS: Windows XP Pro
Compiler: VC++ 8.0
wxWidgets: 2.8.0
IDE: VC++
OS: Windows XP Pro
Compiler: VC++ 8.0
wxWidgets: 2.8.0
IDE: VC++
-
- Earned some good credits
- Posts: 146
- Joined: Sun Nov 26, 2006 7:37 am
- Location: Tennessee, USA
- Contact:
I use it just as you have described, and for windows I still have to have a resource file if I want the icon in the task bar/manager. I would love if I am doing something wrong, and I dont need the resource file.
Thanks,
JS
Thanks,
JS
OS Windows XP Pro
Compiler MinGW 3.4.5
wxWidgets 2.8.7 (Unicode : Monolithic : Release)
IDE Code::Blocks (Latest Release)
RAD wxFormBuilder (Latest Release)
Compiler MinGW 3.4.5
wxWidgets 2.8.7 (Unicode : Monolithic : Release)
IDE Code::Blocks (Latest Release)
RAD wxFormBuilder (Latest Release)