wxautobufferedpaintdcthis 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 include files <wx/dcbuffer.h> see also members
wxautobufferedpaintdc::wxautobufferedpaintdc
wxautobufferedpaintdc::wxautobufferedpaintdcwxautobufferedpaintdc(wxwindow *window) constructor. pass a pointer to the window on which you wish to paint.
|