X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..a7d5151df02bf70a9f6ff1c5c7fd33ab07bf409c:/src/msw/enhmeta.cpp diff --git a/src/msw/enhmeta.cpp b/src/msw/enhmeta.cpp index 037b749003..cf6e758b69 100644 --- a/src/msw/enhmeta.cpp +++ b/src/msw/enhmeta.cpp @@ -194,7 +194,9 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename, int width, int height, const wxString& description) { - ScreenHDC hdcRef; + m_width = width; + m_height = height; + RECT rect; RECT *pRect; if ( width && height ) @@ -215,6 +217,7 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename, pRect = (LPRECT)NULL; } + ScreenHDC hdcRef; m_hDC = (WXHDC)::CreateEnhMetaFile(hdcRef, GetMetaFileName(filename), pRect, description); if ( !m_hDC ) @@ -223,6 +226,14 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename, } } +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") );