Hi guys,
I've a small problem: I need to set the icon of a wxAboutDialogInfo so I've write:
aboutInfo.SetIcon(wxIcon(GlobalSpace::GetImagesDir() << "icon.ico", wxBITMAP_TYPE_ICO, 200, 115));
But when I call wxAboutBox(aboutInfo), the icon don't change: it display the main frame icon
It's a bug? The icon exists, the path is correct
wxAboutDialogInfo set icon
-
- Experienced Solver
- Posts: 96
- Joined: Thu Apr 17, 2014 10:10 am
wxAboutDialogInfo set icon
I'm Italian but we can speak C++
Re: wxAboutDialogInfo set icon
Try loading the icon into a separate object and check if it's ok. Then you know if the problem lies in the icon itself or inside the SetIcon() call.
Code: Select all
wxIcon icon(GlobalSpace::GetImagesDir() << "icon.ico", wxBITMAP_TYPE_ICO, 200, 115);
if( icon.IsOk() )
{
...
}
Use the source, Luke!
-
- Experienced Solver
- Posts: 96
- Joined: Thu Apr 17, 2014 10:10 am
Re: wxAboutDialogInfo set icon
Hi, thank you for your reply
I've write "if (icon isnt ok)" and the condition is true.
So I've thinked that the problem could be the type of the Icon (wxBITMAP_TYPE_ICO) so I've revased the icon (with .ico format, with GIMP) but nothing change.
So I've tried to save it with .png extension (and format) and now work, thank you
Is there a method for center the icon to Y axis without redraws the dialog?
I've write "if (icon isnt ok)" and the condition is true.
So I've thinked that the problem could be the type of the Icon (wxBITMAP_TYPE_ICO) so I've revased the icon (with .ico format, with GIMP) but nothing change.
So I've tried to save it with .png extension (and format) and now work, thank you
Is there a method for center the icon to Y axis without redraws the dialog?
I'm Italian but we can speak C++