#include "wx/msw/private.h"
-#if !USE_SHARED_LIBRARIES
- IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
-
- #if wxUSE_PORTABLE_FONTS_IN_MSW
- IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
- #endif
-#endif
+IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
// ----------------------------------------------------------------------------
// wxFontRefData - the internal description of the font
{
if ( !::DeleteObject((HFONT) m_hFont) )
{
- wxLogLastError("DeleteObject(font)");
+ wxLogLastError(wxT("DeleteObject(font)"));
}
}
}
{
// VZ: the old code returned FALSE in this case, but it doesn't seem
// to make sense because the font _was_ created
- wxLogDebug(wxT("Calling wxFont::RealizeResource() twice"));
-
return TRUE;
}
LOGFONT lf;
wxFillLogFont(&lf, this);
M_FONTDATA->m_hFont = (WXHFONT)::CreateFontIndirect(&lf);
+ M_FONTDATA->m_faceName = lf.lfFaceName;
if ( !M_FONTDATA->m_hFont )
{
- wxLogLastError("CreateFont");
+ wxLogLastError(wxT("CreateFont"));
return FALSE;
}
{
if ( !::DeleteObject((HFONT) M_FONTDATA->m_hFont) )
{
- wxLogLastError("DeleteObject(font)");
+ wxLogLastError(wxT("DeleteObject(font)"));
}
M_FONTDATA->m_hFont = 0;
}
WXHANDLE wxFont::GetResourceHandle()
+{
+ return GetHFONT();
+}
+
+WXHFONT wxFont::GetHFONT() const
{
if ( !M_FONTDATA )
return 0;