X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/024fb9b98a1e75d14c99e205fe77af265888c884..53faea431638ee5c0013a2c888215c751fa6437b:/src/msw/fontenum.cpp diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index c2faf35d09..f91b00c91f 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -110,6 +110,16 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) return TRUE; } +#if defined(__GNUWIN32__) + #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) + #define wxFONTENUMPROC int(*)(const LOGFONTA *, const TEXTMETRICA *, long unsigned int, LPARAM) + #else + #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) + #endif +#else + #define wxFONTENUMPROC FONTENUMPROC +#endif + void wxFontEnumeratorHelper::DoEnumerate() { HDC hDC = ::GetDC(NULL); @@ -119,11 +129,16 @@ 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, - (LPARAM) (void*) this) ; + #ifdef STRICT + (LPARAM) + #else + (LPSTR) + #endif + this); #endif // Win32/16 ::ReleaseDC(NULL, hDC);