#if defined(__WIN32__) && !defined(__WXMICROWIN__)
+#if wxUSE_GUI
+
// VZ: the new version of wxCharsetToCodepage() is more politically correct
// and should work on other Windows versions as well but the old version is
-// still needed for !wxUSE_FONTMAP case
+// still needed for !wxUSE_FONTMAP || !wxUSE_GUI case
extern long wxEncodingToCodepage(wxFontEncoding encoding)
{
return csetInfo.ciACP;
}
-#if wxUSE_FONTMAP && wxUSE_GUI
+#if wxUSE_FONTMAP
extern long wxCharsetToCodepage(const wxChar *name)
{
return wxEncodingToCodepage(enc);
}
-#else // old wxCharsetToCodepage() by OK
+#endif // wxUSE_FONTMAP
+
+#endif // wxUSE_GUI
+
+// include old wxCharsetToCodepage() by OK if needed
+#if !wxUSE_GUI || !wxUSE_FONTMAP
#include "wx/msw/registry.h"
return CP;
}
-#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
+#endif // !wxUSE_GUI || !wxUSE_FONTMAP
#endif // Win32