]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dll/my_dll.cpp
Fix testing for existence of paths with trailing separators in wxMSW.
[wxWidgets.git] / samples / dll / my_dll.cpp
index 4b67d6d04e55a569707c531dd1c3ac562c2619a9..3aa93e97083ffcb0792fab0f398267f5d2837c7e 100644 (file)
@@ -22,8 +22,8 @@
     #pragma hdrstop
 #endif
 
-#ifndef __WXMSW__
-    #error "This sample is MSW-only"
+#ifndef __WINDOWS__
+    #error "This sample is Windows-only"
 #endif
 
 #include "wx/app.h"
@@ -150,10 +150,10 @@ MyDllApp::MyDllApp()
 
     Connect(wxEVT_IDLE, wxIdleEventHandler(MyDllApp::OnIdle));
     Connect(CMD_SHOW_WINDOW,
-            wxEVT_COMMAND_THREAD,
+            wxEVT_THREAD,
             wxThreadEventHandler(MyDllApp::OnShowWindow));
     Connect(CMD_TERMINATE,
-            wxEVT_COMMAND_THREAD,
+            wxEVT_THREAD,
             wxThreadEventHandler(MyDllApp::OnTerminate));
 }
 
@@ -288,7 +288,7 @@ void run_wx_gui_from_dll(const char *title)
 
     // Send a message to wx thread to show a new frame:
     wxThreadEvent *event =
-        new wxThreadEvent(wxEVT_COMMAND_THREAD, CMD_SHOW_WINDOW);
+        new wxThreadEvent(wxEVT_THREAD, CMD_SHOW_WINDOW);
     event->SetString(title);
     wxQueueEvent(wxApp::GetInstance(), event);
 }
@@ -303,7 +303,7 @@ void wx_dll_cleanup()
     // If wx main thread is running, we need to stop it. To accomplish this,
     // send a message telling it to terminate the app.
     wxThreadEvent *event =
-        new wxThreadEvent(wxEVT_COMMAND_THREAD, CMD_TERMINATE);
+        new wxThreadEvent(wxEVT_THREAD, CMD_TERMINATE);
     wxQueueEvent(wxApp::GetInstance(), event);
 
     // We must then wait for the thread to actually terminate.