X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11c7d5b6d1cb54d5ffdc11d8ff092b41e225bfb6..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/msw/fontenum.cpp?ds=sidebyside diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 33b5a192d8..7021de27dc 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -103,14 +103,19 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) // no such encodings at all return FALSE; } - - m_charset = info.charset; - m_facename = info.facename; } + m_charset = info.charset; + m_facename = info.facename; return TRUE; } +#ifdef __GNUWIN32_OLD__ + #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) +#else + #define wxFONTENUMPROC FONTENUMPROC +#endif + void wxFontEnumeratorHelper::DoEnumerate() { HDC hDC = ::GetDC(NULL); @@ -120,7 +125,7 @@ void wxFontEnumeratorHelper::DoEnumerate() lf.lfCharSet = m_charset; wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName)); lf.lfPitchAndFamily = 0; - ::EnumFontFamiliesEx(hDC, &lf, (FONTENUMPROC)wxFontEnumeratorProc, + ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc, (LPARAM)this, 0 /* reserved */) ; #else // Win16 ::EnumFonts(hDC, (LPTSTR)NULL, (FONTENUMPROC)wxFontEnumeratorProc,