Re: Q: Example of ANSI Screen Control Code Use?

From: r norman (rsn__at__comcast.net)
Date: 03/29/05

  • Next message: Billy Patton: "why does this happen?"
    Date: Tue, 29 Mar 2005 13:42:49 -0500
    
    

    On Tue, 29 Mar 2005 12:47:10 -0500, "Neil - Salem, MA USA"
    <Neil@Salem.Massachusetts.USA> wrote:

    >I am so new to C++ that most newbies are experts by comparison. (But
    >...give me a year and I will hopefully begin to be competent. I have 12
    >excellent books, recommended by folks on comp.lang.c++.moderated, that I am,
    >and will be, reading.) That said, forgive my question if it has been asked
    >and answered before.
    >
    >Since there is only basic support for screens in C++, how can I create ANSI
    >color screens using ANSI screen control codes? Can someone direct me to a
    >good, yet simple, example? I will be running my C++ program in a DOS window
    >on a Windows XP system. Will I need a driver like ansi.sys?
    >

    I most strongly urge you to reconsider your strategy. The ANSI screen
    control codes were very useful for a period of time that is long past.
    There are now far more sophisticated screen display systems that are
    far more useful and desirable if you want to make useful programs.

    True, there is no support in the basic C++ language for windowed or
    graphical user interface programming. But that doesn't mean you
    should do that using tools available through your compiler or
    operating system.

    If you really do want to write plain, vanilla "console" type programs
    that write to cin and cout (or stdin and stdout in C), then just
    concentrate on plain, vanilla text output.

    To be more specific, the ANSI control codes were developed for use by
    "smart" terminals, peripheral devices used to interface with computers
    in the "good old days". The ANSI sys driver used by DOS was a way of
    making the PC running DOS emulate a terminal. OK, it may be that you
    really do have to write software to support such a terminal. Unless
    that is true, though, I suggest you develop your skills in other
    directions.


  • Next message: Billy Patton: "why does this happen?"