#pragma hdrstop
#endif
-#if wxUSE_FONTMAP
+#if wxUSE_FONTENUM
#ifndef WX_PRECOMP
#include "wx/gdicmn.h"
#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
- DWORD dwStyle, LONG lParam);
+ DWORD dwStyle, LPARAM lParam);
#endif
// ============================================================================
#ifdef __WXWINCE__
::EnumFontFamilies(hDC,
- m_facename.empty() ? NULL : m_facename.c_str(),
+ m_facename.empty() ? NULL : m_facename.wx_str(),
(wxFONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this) ;
#else // __WIN32__
LOGFONT lf;
lf.lfCharSet = (BYTE)m_charset;
- wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
+ wxStrlcpy(lf.lfFaceName, m_facename.c_str(), WXSIZEOF(lf.lfFaceName));
lf.lfPitchAndFamily = 0;
::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this, 0 /* reserved */) ;
#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