X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/146477814355dfb48cf46ce2b68de2dcdac4596e..491b5be8305968871bc289453ed088a70c3de044:/src/msw/fontenum.cpp?ds=sidebyside diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index b547ec12f4..1f7305a937 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -28,10 +28,13 @@ #pragma hdrstop #endif +#if wxUSE_FONTMAP + #ifndef WX_PRECOMP #include "wx/font.h" #endif +#include "wx/fontutil.h" #include "wx/fontenum.h" #include "wx/fontmap.h" @@ -90,8 +93,10 @@ private: // private functions // ---------------------------------------------------------------------------- +#ifndef __WXMICROWIN__ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwStyle, LONG lParam); +#endif // ============================================================================ // implementation @@ -132,9 +137,9 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) return TRUE; } -#if defined(__GNUWIN32__) +#if defined(__GNUWIN32__) && !defined(__CYGWIN10__) #if wxUSE_NORLANDER_HEADERS - #define wxFONTENUMPROC int(*)(const LOGFONTA *, const TEXTMETRICA *, long unsigned int, LPARAM) + #define wxFONTENUMPROC int(*)(const LOGFONT *, const TEXTMETRIC *, long unsigned int, LPARAM) #else #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) #endif @@ -144,6 +149,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) void wxFontEnumeratorHelper::DoEnumerate() { +#ifndef __WXMICROWIN__ HDC hDC = ::GetDC(NULL); #ifdef __WIN32__ @@ -164,6 +170,7 @@ void wxFontEnumeratorHelper::DoEnumerate() #endif // Win32/16 ::ReleaseDC(NULL, hDC); +#endif } bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf, @@ -243,6 +250,7 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family) // Windows callbacks // ---------------------------------------------------------------------------- +#ifndef __WXMICROWIN__ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwStyle, LONG lParam) { @@ -257,4 +265,6 @@ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm, return fontEnum->OnFont(lplf, lptm); } +#endif +#endif // wxUSE_FONTMAP