///////////////////////////////////////////////////////////////////////////////
-// Name: msw/enhmeta.cpp
+// Name: src/msw/enhmeta.cpp
// Purpose: implementation of wxEnhMetaFileXXX classes
// Author: Vadim Zeitlin
// Modified by:
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "enhmeta.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
}
else // have valid file name, load metafile from it
{
- m_hMF = GetEnhMetaFile(m_filename);
+ m_hMF = (WXHANDLE)::GetEnhMetaFile(m_filename);
if ( !m_hMF )
wxLogSysError(_("Failed to load metafile from file \"%s\"."),
m_filename.c_str());
int width, int height,
const wxString& description)
{
- ScreenHDC hdcRef;
+ m_width = width;
+ m_height = height;
+
RECT rect;
RECT *pRect;
if ( width && height )
pRect = (LPRECT)NULL;
}
+ ScreenHDC hdcRef;
m_hDC = (WXHDC)::CreateEnhMetaFile(hdcRef, GetMetaFileName(filename),
pRect, description);
if ( !m_hDC )
}
}
+void wxEnhMetaFileDC::DoGetSize(int *width, int *height) const
+{
+ if ( width )
+ *width = m_width;
+ if ( height )
+ *height = m_height;
+}
+
wxEnhMetaFile *wxEnhMetaFileDC::Close()
{
wxCHECK_MSG( Ok(), NULL, _T("invalid wxEnhMetaFileDC") );