Thread: Multiple console windows

  1. #1
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107

    Multiple console windows

    I'm trying to create a multithreaded program where each thread get's it's own console window. The trouble is, windows only seems to support handing out threads at the process level, and I can't seem to find a good way to get around this. Having to create new processes for each console would add a lot of uneccesary complication to what I'm trying to do, so does anyone know how to get around this?

    Edit: Oh, and since I'm programming the whole thing with the Windows API I'd prefer non-MFC solutions if possible.
    Last edited by Xzyx987X; 01-02-2004 at 01:25 PM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    from MSDN: AllocConsole():

    A process can be associated with only one console, so the AllocConsole function fails if the calling process already has a console.
    You're stuck with multiple process's if multiple consoles is truly what you want.
    You can always simulate your own console using normal Win32 GUI programming.

    gg

  3. #3
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107
    *Sigh*, nothing's ever easy is it? Well ok, if I want to create my own console type control for windows, I'm going to have to learn how to program custom controls. Anyone know of a good tutorual for this (once again, preferably using the API.) I've actually been meaning to learn this for a while, so I guess now's as good of a time as any.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multiple Top Level Windows
    By quark_77 in forum Windows Programming
    Replies: 0
    Last Post: 07-13-2008, 02:32 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Windows app without console
    By Zeike in forum Windows Programming
    Replies: 4
    Last Post: 08-31-2005, 12:59 PM
  4. #Develop Question, How do i create multiple Windows?
    By Zeusbwr in forum C# Programming
    Replies: 0
    Last Post: 04-24-2005, 11:14 AM
  5. Problem with windows console when running.
    By RealityFusion in forum C++ Programming
    Replies: 5
    Last Post: 08-07-2003, 08:56 PM