]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/enhmeta.cpp
Correction in comment in closing #endif. Is VC++ 4 supported?
[wxWidgets.git] / src / msw / enhmeta.cpp
index 1767d356f291bd2610b3d28033d79fa5863b9850..621208202c3f19f1c3207e8adb9d543646e8d650 100644 (file)
@@ -33,6 +33,7 @@
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/log.h"
+    #include "wx/intl.h"
 #endif //WX_PRECOMP
 
 #include "wx/metafile.h"
@@ -70,6 +71,21 @@ static inline const wxChar *GetMetaFileName(const wxString& fn)
 // wxEnhMetaFile
 // ----------------------------------------------------------------------------
 
+void wxEnhMetaFile::Init()
+{
+    if ( m_filename.empty() )
+    {
+        m_hMF = 0;
+    }
+    else // have valid file name, load metafile from it
+    {
+        m_hMF = GetEnhMetaFile(m_filename);
+        if ( !m_hMF )
+            wxLogSysError(_("Failed to load metafile from file \"%s\"."),
+                          m_filename.c_str());
+    }
+}
+
 void wxEnhMetaFile::Assign(const wxEnhMetaFile& mf)
 {
     if ( &mf == this )