X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01dba85a7fc9a1103f866c7c3a5cc72f21c0784e..af547d51b7494fd365ae29e048d458ff72b27056:/src/msw/fontenum.cpp diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 9b8405089a..f91b00c91f 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -110,10 +110,14 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) return TRUE; } -#if defined(__GNUWIN32__) && !defined(__MINGW32__) -#define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) +#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 + #define wxFONTENUMPROC FONTENUMPROC #endif void wxFontEnumeratorHelper::DoEnumerate() @@ -129,7 +133,12 @@ void wxFontEnumeratorHelper::DoEnumerate() (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);