From: Gregory.A.Book on
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