From: Václav Slavík Date: Sun, 26 Sep 2004 23:08:01 +0000 (+0000) Subject: partially reverted Robert's changes, did it more cleanly X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7eb872f4d67141f723745f04b478dda03907d4b6 partially reverted Robert's changes, did it more cleanly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/mslu.h b/include/wx/msw/mslu.h index af0a0d5eb6..de23a77d01 100644 --- a/include/wx/msw/mslu.h +++ b/include/wx/msw/mslu.h @@ -16,16 +16,17 @@ #include "wx/utils.h" #include "wx/wxchar.h" -//------------------------------------------------------------------------ - -WXDLLEXPORT bool wxUsingUnicowsDll(); - -#if wxUSE_UNICODE_MSLU +// Returns true if we are running under Unicode emulation in Win9x environment. +// Workaround hacks take effect only if this condition is met +// (NB: this function is needed even if !wxUSE_UNICODE_MSLU) +WXDLLIMPEXP_BASE bool wxUsingUnicowsDll(); //------------------------------------------------------------------------ // Wrongly implemented functions from unicows.dll //------------------------------------------------------------------------ +#if !wxUSE_UNICODE_MSLU + #if wxUSE_GUI WXDLLEXPORT int wxMSLU_DrawStateW(WXHDC dc, WXHBRUSH br, WXFARPROC outputFunc, diff --git a/src/msw/mslu.cpp b/src/msw/mslu.cpp index cdd08914c8..be45158331 100644 --- a/src/msw/mslu.cpp +++ b/src/msw/mslu.cpp @@ -26,6 +26,22 @@ #endif //------------------------------------------------------------------------ +// Check for use of MSLU +//------------------------------------------------------------------------ + +#if wxUSE_BASE + +bool WXDLLIMPEXP_BASE wxUsingUnicowsDll() +{ +#if wxUSE_UNICODE_MSLU + return (wxGetOsVersion() == wxWIN95); +#else + return false; +#endif +} + +#endif // wxUSE_BASE + #if wxUSE_UNICODE_MSLU diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 0e56e5d0f8..eb91843d61 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -111,22 +111,6 @@ static const wxChar eUSERNAME[] = wxT("UserName"); // implementation // ============================================================================ -#if !wxUSE_UNICODE_MSLU - -bool wxUsingUnicowsDll() -{ - return false; -} - -#else - -bool wxUsingUnicowsDll() -{ - return (wxGetOsVersion() == wxWIN95); -} - -#endif - // ---------------------------------------------------------------------------- // get host name and related // ----------------------------------------------------------------------------