///////////////////////////////////////////////////////////////////////////////
-// 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
#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"
#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
- DWORD dwStyle, LONG lParam);
+ DWORD dwStyle, LPARAM lParam);
#endif
// ============================================================================
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 = (BYTE)m_charset;
#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
- DWORD WXUNUSED(dwStyle), LONG lParam)
+ DWORD WXUNUSED(dwStyle), LPARAM lParam)
{
// we used to process TrueType fonts only, but there doesn't seem to be any
}
#endif
-#endif // wxUSE_FONTMAP
+#endif // wxUSE_FONTENUM