projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
put #if wxUSE_FFILE && wxUSE_STREAMS around functions using wxFFileStream (patch...
[wxWidgets.git]
/
src
/
msw
/
metafile.cpp
diff --git
a/src/msw/metafile.cpp
b/src/msw/metafile.cpp
index cca6815690841db997c113d15bf7cb32c08e1abd..2186f3ef18e5d9573aea35645638bdc04b12380f 100644
(file)
--- a/
src/msw/metafile.cpp
+++ b/
src/msw/metafile.cpp
@@
-191,7
+191,7
@@
wxMetafileDC::wxMetafileDC(const wxString& file, int xext, int yext, int xorg, i
m_maxY = -10000;
if ( !file.empty() && wxFileExists(file) )
wxRemoveFile(file);
m_maxY = -10000;
if ( !file.empty() && wxFileExists(file) )
wxRemoveFile(file);
- m_hDC = (WXHDC) CreateMetaFile(file.empty() ? NULL : file.
c
_str());
+ m_hDC = (WXHDC) CreateMetaFile(file.empty() ? NULL : file.
wx
_str());
m_ok = true;
m_ok = true;
@@
-218,14
+218,13
@@
void wxMetafileDC::DoGetTextExtent(const wxString& string,
if (!fontToUse)
fontToUse = &m_font;
if (!fontToUse)
fontToUse = &m_font;
- HDC dc = GetDC(NULL);
+ ScreenHDC dc;
+ SelectInHDC selFont(dc, GetHfontOf(*fontToUse));
SIZE sizeRect;
TEXTMETRIC tm;
::GetTextExtentPoint32(dc, WXSTRINGCAST string, wxStrlen(WXSTRINGCAST string), &sizeRect);
SIZE sizeRect;
TEXTMETRIC tm;
::GetTextExtentPoint32(dc, WXSTRINGCAST string, wxStrlen(WXSTRINGCAST string), &sizeRect);
- GetTextMetrics(dc, &tm);
-
- ReleaseDC(NULL, dc);
+ ::GetTextMetrics(dc, &tm);
if ( x )
*x = sizeRect.cx;
if ( x )
*x = sizeRect.cx;