How do l execute a program from within the code?
-
Hi everyone, l'm currently working on linking a program to its GUI application. And l was wondering if executing the program from within the GUI code is the correct way to approach it. lf it is, can someone give me some suggestions as to how l should go about it? l've tried calling the system command in my code (eg. system("program < inputDataFile") ), but doing so will result in a black window popping up. l do not want to see a black window flash for a couple of seconds everytime l run my program, so l hope there is another way to do this. Any comments will be appreciated, thanks!
-
Hi everyone, l'm currently working on linking a program to its GUI application. And l was wondering if executing the program from within the GUI code is the correct way to approach it. lf it is, can someone give me some suggestions as to how l should go about it? l've tried calling the system command in my code (eg. system("program < inputDataFile") ), but doing so will result in a black window popping up. l do not want to see a black window flash for a couple of seconds everytime l run my program, so l hope there is another way to do this. Any comments will be appreciated, thanks!
See this article. /ravi Let's put "civil" back into "civilization" http://www.ravib.com ravib@ravib.com
-
Hi everyone, l'm currently working on linking a program to its GUI application. And l was wondering if executing the program from within the GUI code is the correct way to approach it. lf it is, can someone give me some suggestions as to how l should go about it? l've tried calling the system command in my code (eg. system("program < inputDataFile") ), but doing so will result in a black window popping up. l do not want to see a black window flash for a couple of seconds everytime l run my program, so l hope there is another way to do this. Any comments will be appreciated, thanks!
To keep the black window from popping up, try WinExec with the SW_HIDE flag. Even better would be to redirect output entirely, not to a file, but to a pipe. Nothing gets written to a drive this way... Microsoft has sample code for this, you'l find ithere. Georg Haan
-
Hi everyone, l'm currently working on linking a program to its GUI application. And l was wondering if executing the program from within the GUI code is the correct way to approach it. lf it is, can someone give me some suggestions as to how l should go about it? l've tried calling the system command in my code (eg. system("program < inputDataFile") ), but doing so will result in a black window popping up. l do not want to see a black window flash for a couple of seconds everytime l run my program, so l hope there is another way to do this. Any comments will be appreciated, thanks!
Try CreateProcess Todd Smith