X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ca106e860dd06773f1b1d286cccfeb69d78468e..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/msw/dcclient.cpp diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index bad81c1e72..4564a189d1 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -225,6 +225,12 @@ wxPaintDCImpl::wxPaintDCImpl( wxDC *owner, wxWindow *window ) : } #endif // wxHAS_PAINT_DEBUG + // see comments in src/msw/window.cpp where this is defined + extern bool wxDidCreatePaintDC; + + wxDidCreatePaintDC = true; + + m_window = window; // do we have a DC for this window in the cache? @@ -236,11 +242,6 @@ wxPaintDCImpl::wxPaintDCImpl( wxDC *owner, wxWindow *window ) : } else // not in cache, create a new one { - // see comments in src/msw/window.cpp where this is defined - extern bool wxDidCreatePaintDC; - - wxDidCreatePaintDC = true; - m_hDC = (WXHDC)::BeginPaint(GetHwndOf(m_window), &g_paintStruct); if (m_hDC) ms_cache.Add(new wxPaintDCInfo(m_window, this));