X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df91131cb0f90ee8bfb194926a13b1a108ca3c6e..79b7b95aed76eb742deef93d046886c20452fb36:/src/msw/dcclient.cpp diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 080af680d2..75c1c9a550 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -28,11 +28,10 @@ #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/log.h" -#include "wx/window.h" - #include "wx/msw/private.h" // ---------------------------------------------------------------------------- @@ -239,10 +238,16 @@ wxPaintDC::wxPaintDC(wxWindow *canvas) ms_cache.Add(new wxPaintDCInfo(m_canvas, this)); } - // (re)set the DC parameters. // Note: at this point m_hDC can be NULL under MicroWindows, when dragging. - if (GetHDC()) - InitDC(); + if (!GetHDC()) + return; + + // (re)set the DC parameters. + InitDC(); + + // the HDC can have a clipping box (which we didn't set), make sure our + // DoGetClippingBox() checks for it + m_clipping = true; } wxPaintDC::~wxPaintDC()