Click here to Skip to main content
15,891,136 members
Articles / Desktop Programming / MFC

Multiple consoles for a single application

Rate me:
Please Sign up or sign in to vote.
4.96/5 (26 votes)
9 Mar 2006Public Domain5 min read 168.4K   12.3K   73  
Sometimes, it's not enough to have only a single console window for your applcation... let's provide more!!
// ConsoleLogger_Demo.cpp : Defines the entry point for the console application.
//

#include "ConsoleLogger.h"

int main(int argc, char* argv[])
{
	printf ("Hi , i'm the main-process , and  i'm going to show you 2 more consoles...");
	CConsoleLoggerEx coloured_console;
	coloured_console.Create("This is the coloured console");
	
	coloured_console.cls(CConsoleLoggerEx::COLOR_BACKGROUND_RED);
	coloured_console.gotoxy(10,10);
	coloured_console.cprintf( CConsoleLoggerEx::COLOR_WHITE| CConsoleLoggerEx::COLOR_BACKGROUND_BLUE,"White on Blue");


	CConsoleLoggerEx coloured_console1;
	coloured_console1.Create("This is the another console");
	
	coloured_console1.cprintf( CConsoleLoggerEx::COLOR_RED | CConsoleLoggerEx::COLOR_BACKGROUND_BLACK,"Another console");


	getchar();
	
	
	return 0;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Architect Protegrity
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions