+
+ DECLARE_DYNAMIC_CLASS(wxDC)
+ DECLARE_NO_COPY_CLASS(wxDC)
+};
+
+// ----------------------------------------------------------------------------
+// wxDCTemp: a wxDC which doesn't free the given HDC (used by wxWidgets
+// only/mainly)
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDCTemp : public wxDC
+{
+public:
+ wxDCTemp(WXHDC hdc) : wxDC(hdc)
+ {
+ }
+
+ virtual ~wxDCTemp()
+ {
+ // prevent base class dtor from freeing it
+ SetHDC((WXHDC)NULL);
+ }
+
+ virtual void DoGetSize(int *w, int *h) const
+ {
+ wxFAIL_MSG( _T("no way to retrieve the size of generic DC") );
+
+ if ( w )
+ *w = 0;
+ if ( h )
+ *h = 0;
+ }
+
+private:
+ DECLARE_NO_COPY_CLASS(wxDCTemp)
+};
+
+#endif // _WX_MSW_DC_H_
+