show a XPM image in a panel

Miguel Cartagena miguel.cartagena at gmail.com
Sun Jan 7 13:02:09 PST 2007


Yeah. The bmp it's ok, I think.
The problem is that apparently the event ins't called. At least it does
not call the method at no moment.

On 7 jan, 14:05, v... at wxwindows.org (Vadim Zeitlin) wrote:
> On 7 Jan 2007 08:02:25 -0800 Miguel Cartagena <miguel.cartag... 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/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscr... at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-h... at lists.wxwidgets.org







More information about the wx-users mailing list