]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utilsexc.cpp
Provide wxGetKeyState() studfor wxGTK under Windows.
[wxWidgets.git] / src / msw / utilsexc.cpp
index 4dca1464f3719648d8cfb04498a0d199c8e3def3..416fe17562c293a26d5774b7b568db8fcfdf4f9e 100644 (file)
 
 #if !defined(__GNUWIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
     #include <direct.h>
-#ifndef __MWERKS__
     #include <dos.h>
 #endif
-#endif
 
 #if defined(__GNUWIN32__)
     #include <sys/unistd.h>
@@ -794,6 +792,10 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler,
     DWORD dwFlags = CREATE_SUSPENDED;
 
 #ifndef __WXWINCE__
+    if ( (flags & wxEXEC_MAKE_GROUP_LEADER) &&
+            (wxGetOsVersion() == wxOS_WINDOWS_NT) )
+        dwFlags |= CREATE_NEW_PROCESS_GROUP;
+
     dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
 #else
     // we are assuming commands without spaces for now
@@ -855,14 +857,11 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler,
                     // WinCE requires appname to be non null
                     // Win32 allows for null
 #ifdef __WXWINCE__
-                 (wxChar *)
-                 moduleName.wx_str(),// application name
-                 (wxChar *)
-                 arguments.wx_str(), // arguments
+                 moduleName.t_str(), // application name
+                 wxMSW_CONV_LPTSTR(arguments), // arguments
 #else
                  NULL,               // application name (use only cmd line)
-                 (wxChar *)
-                 command.wx_str(),   // full command line
+                 wxMSW_CONV_LPTSTR(command), // full command line
 #endif
                  NULL,               // security attributes: defaults for both
                  NULL,               //   the process and its main thread
@@ -870,7 +869,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler,
                  dwFlags,            // process creation flags
                  envBuffer.data(),   // environment (may be NULL which is fine)
                  useCwd              // initial working directory
-                    ? const_cast<wxChar *>(env->cwd.wx_str())
+                    ? wxMSW_CONV_LPTSTR(env->cwd)
                     : NULL,          //     (or use the same)
                  &si,                // startup info (unused here)
                  &pi                 // process info