X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..88664cda087e8bdd72aa8785b1200f988896b1a6:/src/msw/dcclient.cpp diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 890f27dffd..75c1c9a550 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -29,10 +29,9 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" + #include "wx/window.h" #endif -#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()