+#include "wx/msw/private.h"
+
+// ----------------------------------------------------------------------------
+// array/list types
+// ----------------------------------------------------------------------------
+
+struct WXDLLEXPORT wxPaintDCInfo
+{
+ wxPaintDCInfo(wxWindow *win, wxPaintDCImpl *dc)
+ {
+ hwnd = win->GetHWND();
+ hdc = dc->GetHDC();
+ count = 1;
+ }
+
+ 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
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// global variables
+// ----------------------------------------------------------------------------
+
+static PAINTSTRUCT g_paintStruct;
+
+#ifdef wxHAS_PAINT_DEBUG
+ // a global variable which we check to verify that wxPaintDC are only
+ // 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 // wxHAS_PAINT_DEBUG
+
+// ===========================================================================
+// implementation
+// ===========================================================================
+
+// ----------------------------------------------------------------------------
+// wxMSWWindowDCImpl
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxMSWDCImpl)
+
+wxWindowDCImpl::wxWindowDCImpl( wxDC *owner ) :
+ wxMSWDCImpl( owner )
+{
+}
+
+wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) :
+ wxMSWDCImpl( owner )
+{
+ wxCHECK_RET( window, wxT("invalid window in wxWindowDCImpl") );