From: Gregory.A.Book on 28 Oct 2008 11:56 I'm trying to draw onto a wxPanel using a buffered DC. I'm able to draw using a wxClientDC, but the flickering is bad, so I wanted to use double buffering. Using the following code and wxBufferedDC, I see nothing on the panel. This is in the wxFrame::Create() function cdc = new wxClientDC(this->pnlMain); dc = new wxBufferedDC(cdc); This is the OnPaint() function: wxPaintDC pdc(this); Draw(); And this is the Draw() function dc->SetBrush(*wxRED_BRUSH); if (bgImage.IsOk()) { dc->DrawBitmap(bgImage,15,15); } dc->DrawLine(10,10,100,100); I'm not sure whats happening here, because it works fine with only a wxClientDC (except the flicker), but not for the wxBufferedDC. Thanks! -Greg
|
Pages: 1 Prev: Sizer in ScrolledWindow problem Next: EVT_MEDIA_LOADED Vista |