fixed enhanced metafiles loading from files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
68e24a7b28
commit
7a295dfa5c
@ -61,7 +61,7 @@ public:
|
|||||||
void SetHENHMETAFILE(WXHANDLE hMF) { Free(); m_hMF = hMF; }
|
void SetHENHMETAFILE(WXHANDLE hMF) { Free(); m_hMF = hMF; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init() { m_hMF = 0; }
|
void Init();
|
||||||
void Free();
|
void Free();
|
||||||
void Assign(const wxEnhMetaFile& mf);
|
void Assign(const wxEnhMetaFile& mf);
|
||||||
|
|
||||||
|
@ -70,6 +70,21 @@ static inline const wxChar *GetMetaFileName(const wxString& fn)
|
|||||||
// wxEnhMetaFile
|
// 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)
|
void wxEnhMetaFile::Assign(const wxEnhMetaFile& mf)
|
||||||
{
|
{
|
||||||
if ( &mf == this )
|
if ( &mf == this )
|
||||||
|
Loading…
Reference in New Issue
Block a user