]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcclient.cpp
move wxIsDragResultOk out of line to avoid problems with DLL-exported inline function...
[wxWidgets.git] / src / msw / dcclient.cpp
index b2a21e9de57b2f7b281b2a8daa9f085fe57fff7b..05685aa39f165e7c0e4713b120402c233ad2c099 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        dcclient.cpp
+// Name:        src/msw/dcclient.cpp
 // Purpose:     wxClientDC class
 // Author:      Julian Smart
 // Modified by:
 // 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"
 
     #pragma hdrstop
 #endif
 
-#include "wx/string.h"
-#include "wx/log.h"
-#include "wx/window.h"
+#include "wx/dcclient.h"
 
-#include "wx/msw/private.h"
+#ifndef WX_PRECOMP
+    #include "wx/string.h"
+    #include "wx/log.h"
+    #include "wx/window.h"
+#endif
 
-#include "wx/dcclient.h"
+#include "wx/msw/private.h"
 
 // ----------------------------------------------------------------------------
 // array/list types
@@ -56,7 +54,7 @@ struct WXDLLEXPORT wxPaintDCInfo
 
 #include "wx/arrimpl.cpp"
 
-WX_DEFINE_OBJARRAY(wxArrayDCInfo);
+WX_DEFINE_OBJARRAY(wxArrayDCInfo)
 
 // ----------------------------------------------------------------------------
 // macros
@@ -75,7 +73,7 @@ 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
+    // 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;
@@ -169,7 +167,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 +255,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 +310,7 @@ WXHDC wxPaintDC::FindDCInCache(wxWindow* win)
 /*
  * wxPaintDCEx
  */
+
 // TODO: don't duplicate wxPaintDC code here!!
 
 wxPaintDCEx::wxPaintDCEx(wxWindow *canvas, WXHDC dc) : saveState(0)
@@ -342,7 +340,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);
@@ -357,4 +355,3 @@ wxPaintDCEx::~wxPaintDCEx()
     // prevent the base class dtor from ReleaseDC()ing it again
     m_hDC = 0;
 }
-