From a15d14a0c266b9e86c5a2ca39b3c1808a5e1bae0 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 14 Dec 2012 14:41:07 +0100 Subject: wx: Fix loading icons and cursors in Windows wxWidgets looked in the wrong executable after icons and cursors, stole wxLua's solution. Also finds wx-2.9 on windows --- lib/wx/c_src/wxe_impl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/wx/c_src') diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp index 5f3122d7d8..5442fea618 100644 --- a/lib/wx/c_src/wxe_impl.cpp +++ b/lib/wx/c_src/wxe_impl.cpp @@ -30,6 +30,11 @@ // Ok ugly but needed for wxBufferedDC crash workaround #define private public #include + +#if defined(__WXMSW__) + #include // for wxSetInstance +#endif + #undef private #include "wxe_impl.h" @@ -222,6 +227,11 @@ void *wxe_main_loop(void *vpdl) // This should be done in emulator but it's not in yet. #ifndef _WIN32 erts_thread_disable_fpe(); +#else + // Setup that wxWidgets should look for cursors and icons in + // this dll and not in werl.exe (which is the default) + HMODULE WXEHandle = GetModuleHandle(_T("wxe_driver")); + wxSetInstance((HINSTANCE) WXEHandle); #endif result = wxEntry(argc, argv); -- cgit v1.2.3