[windows, visual studio] can't create wxBitmap from resource

bowser alessandro.denardi at gmail.com
Tue May 8 09:16:02 PDT 2007


I've embedded some bitmaps in my project with visual studio. To load
them I do:

wxBitmap b = wxBitmap(wxT("IDB_BITMAP1"), wxBITMAP_TYPE_BMP_RESOURCE);

but at runtime I get an error saying
"Can't load bitmap 'IDB_BITMAP1' from resources! Check .rc file."
The same happens if I substitute IDB_BITMAP1 with the relative value
(as defined in the automatically created file resource.h), or even
with the file name.
I verified that the compiler does the embedding, in fact the binary
size is incremented
by exactly the bmps' size.

What am I doing wrong?
Thank you,
Alessandro







More information about the wx-users mailing list