// 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
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;
{
wxSize size = wxDefaultSize;
- if ( Ok() )
+ if ( IsOk() )
{
ENHMETAHEADER hdr;
if ( !::GetEnhMetaFileHeader(GetEMF(), sizeof(hdr), &hdr) )
}
m_hDC = (WXHDC)::CreateEnhMetaFile(hdcRef, GetMetaFileName(filename),
- pRect, description.wx_str());
+ pRect, description.t_str());
if ( !m_hDC )
{
wxLogLastError(wxT("CreateEnhMetaFile"));
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();
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();