These were the days when I tried to display a BMP image from memory in the wxWidgets dialog box, but none of my attempts succeeded.
First, I tried to create the wxStaticBitmap control in my dialog box:
wxStaticBitmap *ibitmap;
ibitmap = new wxStaticBitmap(mainPanel, 4000, wxBitmap(MyLogo, wxBITMAP_TYPE_BMP, 200, 62), wxPoint(10, 10), wxSize(200, 62));
I have no errors, but the image did not appear.
Secondly, I tried to draw an image inside the EVT_PAINT dialog box:
wxBitmap *ibitmap;
EVT_PAINT(OnPaint)
ibitmap = new wxBitmap(MyLogo, wxBITMAP_TYPE_BMP, 200, 62);
void MyDialog::OnPaint(wxPaintEvent &event)
{
wxPaintDC dc(this);
dc.DrawBitmap(*ibitmap, 10, 10);
}
Now I got this debug warning:
http://img266.imageshack.us/img266/9512/wxerror.jpg
and the debugger is stopped at this line:
{ DoDrawBitmap(bmp, x, y, useMask); }
Anyone please point me?