]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dlmsw.cpp
added --enable-uxtheme option
[wxWidgets.git] / src / msw / dlmsw.cpp
index 7faff796a5f4c93818e04e4e3461576b97eb8265..18a819d796ad1b72124e73578f92c2a7f4fae514 100644 (file)
@@ -141,7 +141,11 @@ HMODULE wxGetModuleHandle(const char *name, void *addr)
     // Windows CE only has Unicode API, so even we have an ANSI string here, we
     // still need to use GetModuleHandleW() there and so do it everywhere to
     // avoid #ifdefs -- this code is not performance-critical anyhow...
-    return ::GetModuleHandle(wxString::FromAscii((char *)name));
+#ifdef __WINCE__
+    return ::GetModuleHandleW(wxConvLibc.cMB2WC(name).data());
+#else
+    return ::GetModuleHandleA((char *)name);
+#endif
 }
 
 // ============================================================================
@@ -278,7 +282,7 @@ wxDllType wxDynamicLibrary::GetProgramHandle()
 wxDllType
 wxDynamicLibrary::RawLoad(const wxString& libname, int WXUNUSED(flags))
 {
-    return ::LoadLibrary(libname);
+    return ::LoadLibrary(libname.wx_str());
 }
 
 /* static */