DOS Text Screen in Dialog

, Russia Lipetsk

The CMonitor control is a lightweight class suitable for displaying dos text screen in Dialog

  1. Include Cmonitor1.h in your dialog class' header file.
  2. Add member variables of type CMonitor control you want to subclass.
  3. Subclass the static controls in your dialog's OnInitDialog() method and use.


   m_monitor.Print(5,14," Window 1 ",0xF1);
   m_monitor.Print(6,17," Window 2 ",0xA1);

In my demo Font include Russian symbol. Code page 866.

If you want change font you need change variable short DosCode; this array contains font information. See Source for more.

The following sample shows how you can make a font array:

// Compile with Borland C++ 3.11
#include <graphics.h>
#include <conio.h>
#include <iostream.h>
#include <stdio.h>

unsigned char mass[12];

void GetCharAt()
  int i,j,bit,tmp,p;

    bit = 0;
      p = getpixel(j,i+1);

        tmp = 1;

      printf("%d ",p);
    mass[i] = (char)bit;
    printf("%d ",mass[i]);

int main()
  int driver, mode;
  unsigned i,j,x,y,p,bit,tmp;
  char ch=0;
  FILE *fp;


  fp = fopen("out.h","w");


      if(i>31)fprintf(fp,"/*'%c'*/ ",ch);
      else fprintf(fp,"/*%X*/ ",ch);

        fprintf(fp,"%d, ",mass[j]);





  return 0;


Demo project source: Text screen in dialog 33 Kb


  • Amazing

    Posted by Amir on 04/27/2014 03:10am

    I was searching for a console solution for port my app written in C++ in Linux to windows. This program is great but it does not work like a real console. for example print("\this is a text\n1\t2\t3") does not print this this is a text 1 2 3

  • Great, but...

    Posted by Legacy on 11/22/2002 12:00am

    Originally posted by: Philippe Laugier

    I searching for such program for a long time.
    Your code is really great, but...

    I want to use it as a console, thus I run CMD.EXE
    From this console, running a program that ask for an argument before executing some task is not working:
    Nothing is displayed.
    Being a little bit lazy, before searching myself for a solution, I wonder if you don't already have it.

    Example of problem:
    Imagine a program being an assembler:
    Running it ask for a source file name, then a listing file name and finally assemble the file.

    Knowing what it needs, I can type in two names and it works, but I do not see its requests.

  • Wonderfull - ignore the idiots

    Posted by Legacy on 05/02/2002 12:00am

    Originally posted by: trent

    Thanks for the code - it's great!

    Please ignore the ignorant idiots.

  • Plenty of uses...

    Posted by Legacy on 02/05/2002 12:00am

    Originally posted by: JamesP

    In my last job I wrote a command interpreter/programming language for an NT based HiDef video server.

    It was console based, but extensible, allowing for curses style console manipulation (with the right module) as well as Windows SDK calls.

    The company wanted an IDE for it (like VC++), but wanted to retain its immediate command interpreter mode (for simple calls and queries) and use of all modules (including the console manipulation ones).

    I hunted around for ages for a DOS style Command Interpreter Window class that I could use in the IDE. There wasn't one, and I didn't have time to write my own.

  • @_@What is it for?

    Posted by Legacy on 02/01/2002 12:00am

    Originally posted by: Spy

    i'm sorry.........

  • Interesting but...

    Posted by Legacy on 01/31/2002 12:00am

    Originally posted by: Pedro

    Interesting, but what use for this...?

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Moving from an on-premises environment to Office 365 does not remove the need to plan for disruptions or reduce the business risk requirements for protecting email services. If anything, some risks increase with a move to the cloud. Read how to ease the transition every business faces if considering or already migrating to cloud email. This white paper discusses: Setting expectations when migrating to Office 365 Understanding the implications of relying solely on Exchange Online security Necessary archiving …

  • Anthony Christie, the Chief Marketing Officer for Level Communications, is responsible for customer experience, worldwide marketing and product management. In this informative asset, he shares his insights into why a private network connection to cloud-bases applications is the right decision for your enterprise. Download now to find out more.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date