X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..4e15d1caa03346c126015019c1fdf093033ef40b:/src/msw/enhmeta.cpp diff --git a/src/msw/enhmeta.cpp b/src/msw/enhmeta.cpp index a59f622acc..86e334507a 100644 --- a/src/msw/enhmeta.cpp +++ b/src/msw/enhmeta.cpp @@ -59,7 +59,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxEnhMetaFile, wxObject) // we must pass NULL if the string is empty to metafile functions static inline const wxChar *GetMetaFileName(const wxString& fn) - { return !fn ? (const wxChar *)NULL : (const wxChar*)fn.wx_str(); } + { return !fn ? NULL : wxMSW_CONV_LPCTSTR(fn); } // ============================================================================ // implementation @@ -92,7 +92,7 @@ void wxEnhMetaFile::Init() } else // have valid file name, load metafile from it { - m_hMF = (WXHANDLE)::GetEnhMetaFile(m_filename.fn_str()); + m_hMF = (WXHANDLE)::GetEnhMetaFile(m_filename.t_str()); if ( !m_hMF ) { wxLogSysError(_("Failed to load metafile from file \"%s\"."), @@ -134,7 +134,7 @@ void wxEnhMetaFile::Free() bool wxEnhMetaFile::Play(wxDC *dc, wxRect *rectBound) { - wxCHECK_MSG( Ok(), false, wxT("can't play invalid enhanced metafile") ); + wxCHECK_MSG( IsOk(), false, wxT("can't play invalid enhanced metafile") ); wxCHECK_MSG( dc, false, wxT("invalid wxDC in wxEnhMetaFile::Play") ); RECT rect; @@ -174,7 +174,7 @@ wxSize wxEnhMetaFile::GetSize() const { wxSize size = wxDefaultSize; - if ( Ok() ) + if ( IsOk() ) { ENHMETAHEADER hdr; if ( !::GetEnhMetaFileHeader(GetEMF(), sizeof(hdr), &hdr) ) @@ -291,7 +291,7 @@ void wxEnhMetaFileDCImpl::Create(HDC hdcRef, } m_hDC = (WXHDC)::CreateEnhMetaFile(hdcRef, GetMetaFileName(filename), - pRect, description.wx_str()); + pRect, description.t_str()); if ( !m_hDC ) { wxLogLastError(wxT("CreateEnhMetaFile")); @@ -408,7 +408,7 @@ size_t wxEnhMetaFileDataObject::GetDataSize(const wxDataFormat& format) const bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) const { - wxCHECK_MSG( m_metafile.Ok(), false, wxT("copying invalid enh metafile") ); + wxCHECK_MSG( m_metafile.IsOk(), false, wxT("copying invalid enh metafile") ); HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE(); @@ -536,7 +536,7 @@ size_t wxEnhMetaFileSimpleDataObject::GetDataSize() const bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf) const { - wxCHECK_MSG( m_metafile.Ok(), false, wxT("copying invalid enh metafile") ); + wxCHECK_MSG( m_metafile.IsOk(), false, wxT("copying invalid enh metafile") ); HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE();