## wxAutoBufferedPaintDC

This wxDC derivative can be used inside of an `OnPaint()` event handler to achieve double-buffered drawing. Just create an object of this class instead of wxPaintDC and make sure wxWindow::SetBackgroundStyle is called with wxBG_STYLE_CUSTOM somewhere in the class initialization code, and that's all you have to do to (mostly) avoid flicker.

The difference between wxBufferedPaintDC and this class, is the lightweigthness - on platforms which have native double-buffering, wxAutoBufferedPaintDC is simply a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC.

Derived from

wxBufferedPaintDC
wxPaintDC
wxDC
wxObject

Include files

<wx/dcbuffer.h>

See also

wxDC, wxBufferedPaintDC

Members

wxAutoBufferedPaintDC::wxAutoBufferedPaintDC

### wxAutoBufferedPaintDC::wxAutoBufferedPaintDC

wxAutoBufferedPaintDC(wxWindow *window)

Constructor. Pass a pointer to the window on which you wish to paint.