-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC)
-IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
-IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC)
-#endif
+struct WXDLLEXPORT wxPaintDCInfo
+{
+ wxPaintDCInfo(wxWindow *win, wxDC *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
+// ----------------------------------------------------------------------------
+
+ IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
+ IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
+ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
+
+// ----------------------------------------------------------------------------
+// global variables
+// ----------------------------------------------------------------------------
+
+static PAINTSTRUCT g_paintStruct;