wxBitmap display on a panel/frame
Sanghamitra Biswas
SBiswas at sirf.com
Mon Jul 9 02:27:38 PDT 2007
Hi,
One more beginners' question. How can I paint a bitmap on a panel or
frame?
I have the following set of code:
void MyFrame::DisplayImageOnPanel()
{
wxBitmap* bmp = new wxBitmap(_T("test"),wxBITMAP_TYPE_BMP_RESOURCE);
wxClientDC dc(m_panel);
PrepareDC(dc);
this->PrepareDC(dc);
dc.DrawBitmap(*bmp, 0, 0);
}
This function is called from:
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
But this doesn't display the bitmap. But the bitmap has been loaded all
right.
Please tell me if I have missed something.
Thanks & Regards
Sanghamitra
More information about the wx-users
mailing list