From 27539df82bb677d97b1509a415f61c6284c5abdd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 15 Aug 2007 13:00:30 +0000 Subject: [PATCH] fix clipping box retrieval (patch 1771199) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dcclient.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 05685aa39f..fc8dcceefa 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -238,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() -- 2.45.2