show a XPM image in a panel
Vadim Zeitlin
vadim at wxwindows.org
Sun Jan 7 08:05:17 PST 2007
On 7 Jan 2007 08:02:25 -0800 Miguel Cartagena <miguel.cartagena at gmail.com> wrote:
MC> I try to use this event, but I take no effect!
MC>
MC> here is the code:
MC>
MC> BEGIN_EVENT_TABLE(MapPanel, wxPanel)
MC> EVT_ERASE_BACKGROUND(MapPanel::OnEraseBackground)
MC> END_EVENT_TABLE()
MC>
MC> void MapPanel::OnEraseBackground(wxEraseEvent& event){
MC> wxDC* pDc=event.GetDC();
MC>
MC> wxBitmap *bmp = new wxBitmap(mapasc_xpm);
MC> if(!bmp->Ok()) return;
MC>
MC> pDc->DrawBitmap(*bmp, wxCoord(0), wxCoord(0), true);
MC> }
Is bmp ok or not?
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list