+ WXHWND hwnd; // window for this DC
+ WXHDC hdc; // the DC handle
+ size_t count; // usage count
+};
+
+#include "wx/arrimpl.cpp"
+
+WX_DEFINE_OBJARRAY(wxArrayDCInfo);
+
+// ----------------------------------------------------------------------------
+// macros
+// ----------------------------------------------------------------------------
+
+ IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
+ IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
+ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
+
+// ----------------------------------------------------------------------------
+// global variables
+// ----------------------------------------------------------------------------
+
+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
+ // very subtle and difficult to debug refresh/repaint bugs.
+ int g_isPainting = 0;
+#endif // __WXDEBUG__
+
+// ===========================================================================
+// implementation
+// ===========================================================================
+
+// ----------------------------------------------------------------------------
+// wxWindowDC
+// ----------------------------------------------------------------------------
+
+wxWindowDC::wxWindowDC()