]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
A duplicate case label broken mingw compilation
[wxWidgets.git] / src / common / utilscmn.cpp
index b8841a57b05ea99f518f425d7bc014dd9d77ed97..0eb8453bd6910efdf21285bb297c431057290d96 100644 (file)
     #endif // wxUSE_GUI
 #endif // WX_PRECOMP
 
+#ifndef __WIN16__
 #include "wx/process.h"
 #include "wx/txtstrm.h"
+#endif
 
 #include <ctype.h>
 #include <stdio.h>
@@ -970,7 +972,7 @@ wxWindowDisabler::wxWindowDisabler(wxWindow *winToSkip)
     HWND hwndFG = ::GetForegroundWindow();
     m_winTop = hwndFG ? wxFindWinFromHandle((WXHWND)hwndFG) : (wxWindow *)NULL;
 #else
-    HWND hwndFG = ::GetTopWindow();
+    HWND hwndFG = ::GetTopWindow(0);
     m_winTop = hwndFG ? wxFindWinFromHandle((WXHWND)hwndFG) : (wxWindow *)NULL;
 #endif
 #endif // MSW
@@ -1031,8 +1033,8 @@ wxWindowDisabler::~wxWindowDisabler()
     {
         // 16-bit SetForegroundWindow() replacement
         RECT reWin;
-        GetWindowRect(m_winTop, &reWin);
-        SetWindowPos (m_winTop, HWND_TOP,
+        GetWindowRect((HWND) m_winTop, &reWin);
+        SetWindowPos ((HWND) m_winTop, HWND_TOP,
                              reWin.left, reWin.top, 
                              reWin.right - reWin.left, reWin.bottom, 
                              SWP_SHOWWINDOW);
@@ -1045,7 +1047,7 @@ wxWindowDisabler::~wxWindowDisabler()
 // the given one
 bool wxSafeYield(wxWindow *win)
 {
-    wxWindowDisabler wd;
+    wxWindowDisabler wd(win);
 
     bool rc = wxYield();
 
@@ -1089,14 +1091,13 @@ wxString wxGetEmailAddress()
 {
     wxString email;
 
-    wxString host = wxGetHostName();
+    wxString host = wxGetFullHostName();
     if ( !!host )
     {
         wxString user = wxGetUserId();
         if ( !!user )
         {
-            wxString email(user);
-            email << wxT('@') << host;
+            email << user << wxT('@') << host;
         }
     }
 
@@ -1209,6 +1210,10 @@ wxString wxGetCurrentDir()
 
 long wxExecute(const wxString& command, wxArrayString& output)
 {
+#ifdef __WIN16__
+    wxFAIL_MSG("Sorry, this version of wxExecute not implemented on WIN16.");
+    return 0;
+#else
     // create a wxProcess which will capture the output
     wxProcess *process = new wxProcess;
     process->Redirect();
@@ -1229,4 +1234,5 @@ long wxExecute(const wxString& command, wxArrayString& output)
     }
 
     return rc;
+#endif
 }