diff options
author | Brad King <brad.king@kitware.com> | 2003-08-05 19:10:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-08-05 19:10:33 (GMT) |
commit | 59d886d0f4822aecd7744ce06a47438dc9a09046 (patch) | |
tree | 553153d05d8995e7fe64511e1756d55099b7d12f /Source/kwsys/ProcessFwd9x.c | |
parent | 27289e32678663b8d71b842b9e8e5b1b5909d30f (diff) | |
download | CMake-59d886d0f4822aecd7744ce06a47438dc9a09046.zip CMake-59d886d0f4822aecd7744ce06a47438dc9a09046.tar.gz CMake-59d886d0f4822aecd7744ce06a47438dc9a09046.tar.bz2 |
ENH: Added show/hide window support.
Diffstat (limited to 'Source/kwsys/ProcessFwd9x.c')
-rw-r--r-- | Source/kwsys/ProcessFwd9x.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessFwd9x.c b/Source/kwsys/ProcessFwd9x.c index b837bf5..7c03a68 100644 --- a/Source/kwsys/ProcessFwd9x.c +++ b/Source/kwsys/ProcessFwd9x.c @@ -54,6 +54,9 @@ int main() This is parsed off the command line. */ HANDLE killEvent = 0; + /* Flag for whether to hide window of child process. */ + int hideWindow = 0; + /* An array of the handles on which we wait when the child is running. */ HANDLE waitHandles[2] = {0, 0}; @@ -79,6 +82,11 @@ int main() while(*cmdLine && *cmdLine == ' ') { ++cmdLine; } sscanf(cmdLine, "%p", &killEvent); + /* Parse the hide window flag. */ + while(*cmdLine && *cmdLine != ' ') { ++cmdLine; } + while(*cmdLine && *cmdLine == ' ') { ++cmdLine; } + sscanf(cmdLine, "%d", &hideWindow); + /* Skip to the beginning of the command line of the real child. */ while(*cmdLine && *cmdLine != ' ') { ++cmdLine; } while(*cmdLine && *cmdLine == ' ') { ++cmdLine; } @@ -88,7 +96,7 @@ int main() ZeroMemory(&pi, sizeof(pi)); si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW; - si.wShowWindow = SW_SHOWDEFAULT; + si.wShowWindow = hideWindow?SW_HIDE:SW_SHOWDEFAULT; si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle(STD_ERROR_HANDLE); |