X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fa6ebf70668032c517dc32e94b8f27ef3c3e6b7..25e6a4a698b15d72874bd1dbf4d260163a60f005:/src/msw/dcclient.cpp diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 0093ebeaa5..d318904387 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "dcclient.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -56,7 +52,7 @@ struct WXDLLEXPORT wxPaintDCInfo #include "wx/arrimpl.cpp" -WX_DEFINE_OBJARRAY(wxArrayDCInfo); +WX_DEFINE_OBJARRAY(wxArrayDCInfo) // ---------------------------------------------------------------------------- // macros @@ -75,8 +71,8 @@ static PAINTSTRUCT g_paintStruct; #ifdef __WXDEBUG__ // a global variable which we check to verify that wxPaintDC are only - // created in resopnse to WM_PAINT message - doing this from elsewhere is a - // common programming error among wxWindows programmers and might lead to + // created in response to WM_PAINT message - doing this from elsewhere is a + // common programming error among wxWidgets programmers and might lead to // very subtle and difficult to debug refresh/repaint bugs. int g_isPainting = 0; #endif // __WXDEBUG__ @@ -169,7 +165,7 @@ void wxClientDC::InitDC() } // clip the DC to avoid overwriting the non client area - SetClippingRegion(wxPoint(0, 0), m_canvas->GetClientSize()); + SetClippingRegion(wxPoint(0,0), m_canvas->GetClientSize()); #endif // __WXUNIVERSAL__ || __WXWINCE__ } @@ -257,7 +253,7 @@ wxPaintDC::~wxPaintDC() wxCHECK_RET( info, wxT("existing DC should have a cache entry") ); - if ( !--info->count ) + if ( --info->count == 0 ) { ::EndPaint(GetHwndOf(m_canvas), &g_paintStruct); @@ -312,7 +308,7 @@ WXHDC wxPaintDC::FindDCInCache(wxWindow* win) /* * wxPaintDCEx */ - + // TODO: don't duplicate wxPaintDC code here!! wxPaintDCEx::wxPaintDCEx(wxWindow *canvas, WXHDC dc) : saveState(0) @@ -342,7 +338,7 @@ wxPaintDCEx::~wxPaintDCEx() wxCHECK_RET( info, wxT("existing DC should have a cache entry") ); - if ( !--info->count ) + if ( --info->count == 0 ) { RestoreDC((HDC) m_hDC, saveState); ms_cache.RemoveAt(index);