do use the font in DoGetTextExtent()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -218,14 +218,13 @@ void wxMetafileDC::DoGetTextExtent(const wxString& string,
|
||||
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;
|
||||
|
Reference in New Issue
Block a user