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;
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);
- GetTextMetrics(dc, &tm);
-
- ReleaseDC(NULL, dc);
+ ::GetTextMetrics(dc, &tm);
if ( x )
*x = sizeRect.cx;