Console within window (How to?)

I am in the middle of building a program to back up information simply by clicking a button. So far it works but I use the system command (I don't know of any other way right now)and it pulls up a separate window (CMD window). I would like to know how to show that data in a window or have CMD load in a window within the current window? Any ideas on how to accomplish this would be appreciated. I am also planning on adding a progress bar, so any ideas on that also are more than welcome.

Edit: This was originally in Windows programming but it has been a while and no response.
Last edited on
You need to create a pipe -- a file connection between programs. (Specifically, between your program and the console app.)

Use CreatePipe() to create the pipe.

Then use CreateProcess() (or CreateProcessEx()) to open a console application with the standard handles redirected through your pipe.

Now your program needs to loop on input from the pipe until closed. For a GUI, you can set an event to watch for that.

Google around "msdn pipe" for more.

Good luck!
Topic archived. No new replies allowed.