///////////////////////////////////////////////////////////////////////////////
-// 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
// 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"
#pragma hdrstop
#endif
-#if wxUSE_FONTMAP
+#if wxUSE_FONTENUM
#ifndef WX_PRECOMP
#include "wx/gdicmn.h"
#include "wx/font.h"
#include "wx/encinfo.h"
+ #include "wx/dynarray.h"
#endif
#include "wx/msw/private.h"
HDC hDC = ::GetDC(NULL);
#ifdef __WXWINCE__
- ::EnumFontFamilies(hDC, m_facename, (wxFONTENUMPROC)wxFontEnumeratorProc,
- (LPARAM)this) ;
+ ::EnumFontFamilies(hDC,
+ m_facename.empty() ? NULL : m_facename.wx_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,
}
#endif
-#endif // wxUSE_FONTMAP
+#endif // wxUSE_FONTENUM