]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/enhmeta.cpp
add wxGet/Set/HasWindowExStyle() helpers and use them
[wxWidgets.git] / src / msw / enhmeta.cpp
index d2c39001f7f286f823a83bcb33be1211fffdf7bf..a3931c976fe80d1a8f5faa5eaae53505bce301fe 100644 (file)
@@ -209,7 +209,7 @@ bool wxEnhMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height))
 }
 
 // ----------------------------------------------------------------------------
-// wxEnhMetaFileDC
+// wxEnhMetaFileDCImpl
 // ----------------------------------------------------------------------------
 
 class wxEnhMetaFileDCImpl : public wxMSWDCImpl
@@ -233,24 +233,11 @@ private:
 };
 
 
-IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC, wxDC)
-
-wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
-                                 int width, int height,
-                                 const wxString& description)
-               : wxDC(new wxEnhMetaFileDCImpl(this,
-                                              filename,
-                                              width, height,
-                                              description))
-{
-}
-
-
 wxEnhMetaFileDCImpl::wxEnhMetaFileDCImpl( wxEnhMetaFileDC* owner,
                                  const wxString& filename,
                                  int width, int height,
                                  const wxString& description )
-   : wxMSWDCImpl( owner )
+                   : wxMSWDCImpl( owner )
 {
     m_width = width;
     m_height = height;
@@ -315,6 +302,31 @@ wxEnhMetaFileDCImpl::~wxEnhMetaFileDCImpl()
     m_hDC = 0;
 }
 
+// ----------------------------------------------------------------------------
+// wxEnhMetaFileDC
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC, wxDC)
+
+wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
+                                 int width, int height,
+                                 const wxString& description)
+               : wxDC(new wxEnhMetaFileDCImpl(this,
+                                              filename,
+                                              width, height,
+                                              description))
+{
+}
+
+wxEnhMetaFile *wxEnhMetaFileDC::Close()
+{
+    wxEnhMetaFileDCImpl * const
+        impl = wx_static_cast(wxEnhMetaFileDCImpl *, GetImpl());
+    wxCHECK_MSG( impl, NULL, _T("no wxEnhMetaFileDC implementation") );
+
+    return impl->Close();
+}
+
 #if wxUSE_DRAG_AND_DROP
 
 // ----------------------------------------------------------------------------