Fix wxFont::GetFaceName() for not realized yet fonts in wxMSW.
GetFaceName() could be called for a font that hadn't been really used yet and hence its wxFontRefData::m_hFont could be 0 and couldn't be used in GetMSWFaceName(). Fix this by using GetHFONT() accessor instead of m_hFont directly to create the font if necessary. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -279,7 +279,7 @@ protected:
|
||||
wxString GetMSWFaceName() const
|
||||
{
|
||||
ScreenHDC hdc;
|
||||
SelectInHDC selectFont(hdc, m_hFont);
|
||||
SelectInHDC selectFont(hdc, (HFONT)GetHFONT());
|
||||
|
||||
UINT otmSize = GetOutlineTextMetrics(hdc, 0, NULL);
|
||||
if ( !otmSize )
|
||||
|
Reference in New Issue
Block a user