Win32OperatingSystem.st
changeset 9249 094d91550fa5
parent 9248 c98dd89bf2a9
child 9255 fded804fe4e8
--- a/Win32OperatingSystem.st	Mon Mar 06 12:43:38 2006 +0100
+++ b/Win32OperatingSystem.st	Mon Mar 06 13:05:46 2006 +0100
@@ -6871,17 +6871,53 @@
     "
 "/  <apicall: long 'ShellExecuteA' (long char* char* char* char* ulong) module:'shell32.dll'>
 %{
+        unsigned long __nShowCmd = 0;
+
+        if (__isSmallInteger(nShowCmd)) {
+            __nShowCmd = __intVal(nShowCmd);
+        } else {
+            if (nShowCmd == @symbol(SW_SHOW)) {
+                __nShowCmd = SW_SHOW;
+            }
+            if (nShowCmd == @symbol(SW_SHOWNORMAL)) {
+                __nShowCmd = SW_SHOWNORMAL;
+            }
+            if (nShowCmd == @symbol(SW_SHOWDEFAULT)) {
+                __nShowCmd = SW_SHOWDEFAULT;
+            }
+            if (nShowCmd == @symbol(SW_SHOWMAXIMIZED)) {
+                __nShowCmd = SW_SHOWMAXIMIZED;
+            }
+            if (nShowCmd == @symbol(SW_SHOWMINIMIZED)) {
+                __nShowCmd = SW_SHOWMINIMIZED;
+            }
+            if (nShowCmd == @symbol(SW_SHOWMINNOACTIVE)) {
+                __nShowCmd = SW_SHOWMINNOACTIVE;
+            }
+            if (nShowCmd == @symbol(SW_SHOWNA)) {
+                __nShowCmd = SW_SHOWNA;
+            }
+            if (nShowCmd == @symbol(SW_SHOWNOACTIVATE)) {
+                __nShowCmd = SW_SHOWNOACTIVATE;
+            }
+            if (nShowCmd == @symbol(SW_MAXIMIZE)) {
+                __nShowCmd = SW_MAXIMIZE;
+            }
+            if (nShowCmd == @symbol(SW_RESTORE)) {
+                __nShowCmd = SW_RESTORE;
+            }
+        }
+
         if (((lpOperation == nil) || __isString(lpOperation))
          && ((lpFile == nil) || __isString(lpFile))
          && ((lpParameters == nil) || __isString(lpParameters))
          && ((lpDirectory == nil) || __isString(lpDirectory))
-         && __isSmallInteger(nShowCmd)) {
+        ) {
             HANDLE __hwnd = 0;
             char *__lpOperation   = (lpOperation != nil) ? __stringVal(lpOperation) : NULL;
             char *__lpFile        = (lpFile != nil) ? __stringVal(lpFile) : NULL;
             char *__lpParameters  = (lpParameters != nil) ? __stringVal(lpParameters) : NULL;
             char *__lpDirectory   = (lpDirectory != nil) ? __stringVal(lpDirectory) : NULL;
-            unsigned long __nShowCmd = __intVal(nShowCmd);
             long result;
 
             if (hwnd != nil) {
@@ -11225,7 +11261,7 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.225 2006-03-06 11:43:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.226 2006-03-06 12:05:46 cg Exp $'
 ! !
 
 Win32OperatingSystem initialize!