X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbe874bd32f35beb3ed8d019c5a24df21a219f8f..0a95d3369e08206a43032472418693f7726591e5:/src/msw/fontenum.cpp diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index a571fa95c2..852ffea56d 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/fontenum.cpp +// Name: src/msw/fontenum.cpp // Purpose: wxFontEnumerator class for Windows // Author: Julian Smart // Modified by: Vadim Zeitlin to add support for font encodings @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "fontenum.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -31,6 +27,7 @@ #if wxUSE_FONTMAP #ifndef WX_PRECOMP + #include "wx/gdicmn.h" #include "wx/font.h" #include "wx/encinfo.h" #endif @@ -161,11 +158,13 @@ void wxFontEnumeratorHelper::DoEnumerate() HDC hDC = ::GetDC(NULL); #ifdef __WXWINCE__ - ::EnumFontFamilies(hDC, m_facename, (wxFONTENUMPROC)wxFontEnumeratorProc, - (LPARAM)this) ; + ::EnumFontFamilies(hDC, + m_facename.empty() ? NULL : m_facename.c_str(), + (wxFONTENUMPROC)wxFontEnumeratorProc, + (LPARAM)this) ; #else // __WIN32__ LOGFONT lf; - lf.lfCharSet = m_charset; + lf.lfCharSet = (BYTE)m_charset; wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName)); lf.lfPitchAndFamily = 0; ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,