Controlling Several Console Windows

Hi, LeafyCiruits here!

Warning: this question strictly refers to the MS DOS Command Shell.

I was wondering if it was possible to "control" 2 or more Console windows at the same time, under one program, without using Win32API. For example, have my main program running under one window, then in another, display a "debug log" that is displaying the contents of variables, etc., as code runs.

If it's not possible, then thanks reading this post :)

If it is:
My first approach was to use system("START");, but that starts the command prompt, which runs separately from the program, so that doesn't work. Other than this, I'm not able to fathom controlling 2 or more windows without using Win32API, or some other non-ISO library.



I'm new to these forums, so constructive criticism on anything is greatly appreciated. ;)
I'm not too experienced with starting console windows directly from the shell, but i believe that only one system console can be open at a given time.
That's what I'm starting to think. I'll leave this post open for a while in case anybody else has any ideas, but I think you're right pogrady.
I confirm. Only one console window can be opened at the same time.

See AllocConsole:

http://msdn.microsoft.com/it-it/library/windows/desktop/ms681944(v=vs.85).aspx

MSDN wrote:
A process can be associated with only one console, so the AllocConsole function fails if the calling process already has a console.


EDIT: Whoops, just noticed you said on the Shell.
I'll leave the above unedited anyways, you may find it useful?
Last edited on
EssGeEich wrote:
I'll leave the above unedited anyways, you may find it useful?


Yes I do find it useful, thank you.
Topic archived. No new replies allowed.