X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..4e15d1caa03346c126015019c1fdf093033ef40b:/src/msw/metafile.cpp diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp index e20f24a5b4..06f9a2a68f 100644 --- a/src/msw/metafile.cpp +++ b/src/msw/metafile.cpp @@ -177,13 +177,13 @@ wxMetafileDCImpl::wxMetafileDCImpl(wxDC *owner, const wxString& file) m_maxY = -10000; // m_title = NULL; - if (!file.IsNull() && wxFileExists(file)) + if ( wxFileExists(file) ) wxRemoveFile(file); - if (!file.IsNull() && (file != wxEmptyString)) - m_hDC = (WXHDC) CreateMetaFile(file); - else + if ( file.empty() ) m_hDC = (WXHDC) CreateMetaFile(NULL); + else + m_hDC = (WXHDC) CreateMetaFile(file); m_ok = (m_hDC != (WXHDC) 0) ; @@ -205,7 +205,7 @@ wxMetafileDCImpl::wxMetafileDCImpl(wxDC *owner, const wxString& file, m_maxY = -10000; if ( !file.empty() && wxFileExists(file) ) wxRemoveFile(file); - m_hDC = (WXHDC) CreateMetaFile(file.empty() ? NULL : file.wx_str()); + m_hDC = (WXHDC) CreateMetaFile(file.empty() ? NULL : wxMSW_CONV_LPCTSTR(file)); m_ok = true;