]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/enhmeta.cpp
WinCE compile fix
[wxWidgets.git] / src / msw / enhmeta.cpp
index c0063dd5e63c076635887ae22143e2c9a28c79cb..cf6e758b69745442ffa8e8729a5d9f0c63c59c04 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "enhmeta.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -198,7 +194,9 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
                                  int width, int height,
                                  const wxString& description)
 {
                                  int width, int height,
                                  const wxString& description)
 {
-    ScreenHDC hdcRef;
+    m_width = width;
+    m_height = height;
+
     RECT rect;
     RECT *pRect;
     if ( width && height )
     RECT rect;
     RECT *pRect;
     if ( width && height )
@@ -219,6 +217,7 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
         pRect = (LPRECT)NULL;
     }
 
         pRect = (LPRECT)NULL;
     }
 
+    ScreenHDC hdcRef;
     m_hDC = (WXHDC)::CreateEnhMetaFile(hdcRef, GetMetaFileName(filename),
                                        pRect, description);
     if ( !m_hDC )
     m_hDC = (WXHDC)::CreateEnhMetaFile(hdcRef, GetMetaFileName(filename),
                                        pRect, description);
     if ( !m_hDC )
@@ -227,6 +226,14 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
     }
 }
 
     }
 }
 
+void wxEnhMetaFileDC::DoGetSize(int *width, int *height) const
+{
+    if ( width )
+        *width = m_width;
+    if ( height )
+        *height = m_height;
+}
+
 wxEnhMetaFile *wxEnhMetaFileDC::Close()
 {
     wxCHECK_MSG( Ok(), NULL, _T("invalid wxEnhMetaFileDC") );
 wxEnhMetaFile *wxEnhMetaFileDC::Close()
 {
     wxCHECK_MSG( Ok(), NULL, _T("invalid wxEnhMetaFileDC") );