]> git.saurik.com Git - wxWidgets.git/commitdiff
partially reverted Robert's changes, did it more cleanly
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 26 Sep 2004 23:08:01 +0000 (23:08 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 26 Sep 2004 23:08:01 +0000 (23:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/mslu.h
src/msw/mslu.cpp
src/msw/utils.cpp

index af0a0d5eb65428b636fc29014cb8c0bd117a3d38..de23a77d014998b988a8907c0bfa6082d77246a4 100644 (file)
 #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,
index cdd08914c8123db82f0de5eb21cb4da800ba46be..be45158331521665d8e23ba62b738d037e2ec435 100644 (file)
 #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
 
index 0e56e5d0f89f2ea060f35d3faf217e4828e8e442..eb91843d616c5aef2a67f8ed3144457ea7b0479a 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------