I've looked all over the net and can't seem to find a standard way of including a wxIcon in my wxWidgets app that actually works! I've tried converting the icon to an XPM and including that I've also tried loading the bitmap but whatever I do it seems to compile but the icon never appears!
+1
A:
Is this the main icon for your application that you're talking about here? If so, you just need to have it as the first icon resource in your .rc file, e.g.:
mainicon ICON "myapp.ico"
If, on the other hand, you're setting an icon specifically on some other frame, then it should be enough to just set it via wxTopLevelWindow::SetIcon
.
If neither of these works, perhaps you could post a sample of your code that isn't working?
Phil Booth
2009-10-31 13:59:32
thanks for the reply I'll give it a go when I get a chance - and its the icon for the main wxFrame which I'm trying to add the icon to.
Mikey
2009-11-06 18:43:45
+1
A:
If you are trying this on Windows make sure the icon is 32x32 pixels. All other sizes weren't being rendered at all...
ruibm
2009-12-10 17:51:29