+class wxEnhMetaFileDCImpl : public wxMSWDCImpl
+{
+public:
+ wxEnhMetaFileDCImpl( wxEnhMetaFileDC *owner,
+ const wxString& filename, int width, int height,
+ const wxString& description );
+ wxEnhMetaFileDCImpl( wxEnhMetaFileDC *owner,
+ const wxDC& referenceDC,
+ const wxString& filename, int width, int height,
+ const wxString& description );
+ virtual ~wxEnhMetaFileDCImpl();
+
+ // obtain a pointer to the new metafile (caller should delete it)
+ wxEnhMetaFile *Close();
+
+protected:
+ virtual void DoGetSize(int *width, int *height) const;
+
+private:
+ void Create(HDC hdcRef,
+ const wxString& filename, int width, int height,
+ const wxString& description);
+
+ // size passed to ctor and returned by DoGetSize()
+ int m_width,
+ m_height;
+};
+
+
+wxEnhMetaFileDCImpl::wxEnhMetaFileDCImpl( wxEnhMetaFileDC* owner,
+ const wxString& filename,
+ int width, int height,
+ const wxString& description )
+ : wxMSWDCImpl( owner )
+{
+ Create(ScreenHDC(), filename, width, height, description);
+}
+
+wxEnhMetaFileDCImpl::wxEnhMetaFileDCImpl( wxEnhMetaFileDC* owner,
+ const wxDC& referenceDC,
+ const wxString& filename,
+ int width, int height,
+ const wxString& description )
+ : wxMSWDCImpl( owner )
+{
+ Create(GetHdcOf(referenceDC), filename, width, height, description);
+}
+
+void wxEnhMetaFileDCImpl::Create(HDC hdcRef,
+ const wxString& filename,