#include <wx/dcbuffer.h>
This wxDC derivative can be used inside of an EVT_PAINT()
event handler to achieve double-buffered drawing.
Just use 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 that this class won't double-buffer on platforms which have native double-buffering already, avoiding any unneccessary buffering to avoid flicker.
wxAutoBufferedPaintDC is simply a typedef of wxPaintDC on platforms that have native double-buffering, otherwise, it is a typedef of wxBufferedPaintDC.
Public Member Functions | |
wxAutoBufferedPaintDC (wxWindow *window) | |
Constructor. |
wxAutoBufferedPaintDC::wxAutoBufferedPaintDC | ( | wxWindow * | window | ) |
Constructor.
Pass a pointer to the window on which you wish to paint.
![]() |
[ top ] |