X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e2b69eececf83c7097435e1f4482cc153e8d82c..69659fd770f615210efac4b4fa741b3ad6223616:/src/msw/fontenum.cpp?ds=sidebyside diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 07a79b78f4..50fea7dc51 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" @@ -34,6 +30,7 @@ #include "wx/gdicmn.h" #include "wx/font.h" #include "wx/encinfo.h" + #include "wx/dynarray.h" #endif #include "wx/msw/private.h" @@ -162,11 +159,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,