This DC derivative can be used inside of an EVT_PAINT() event handler to achieve double-buffered drawing.
Just use this class instead of PaintDC and make sure Window.SetBackgroundStyle is called with BG_STYLE_PAINT somewhere in the class initialization code, and that’s all you have to do to (mostly) avoid flicker.
The difference between BufferedPaintDC and this class is that this class won’t double-buffer on platforms which have native double-buffering already, avoiding any unnecessary buffering to avoid flicker.
AutoBufferedPaintDC is simply a typedef of PaintDC on platforms that have native double-buffering, otherwise, it is a typedef of BufferedPaintDC.
See also