Solved

Console App

Posted on 1998-12-09
1
279 Views
Last Modified: 2010-04-02
Hi... I had a a wonderful dos application written in a very old borland C++. Now I want to just rewrite it in Visual C++. Sounded simple but I cannot find certain equivalent commands. Please help...

1. how do I clear the screen so if the user runs this from dos, the entire screen is cleared. (Borlandc had clrscr())
2. how do I position text at a specific pixel point on the screen (Borlandc had gotoxy(x,y))
3. how do I change the color of my text that I print to the screen
4. and of course, how do I make simple graphs. Drawing a line, placing a point on the graph.

Sorry if this is a bit vague, but so is my knowledge.

0
Comment
Question by:rose3377
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
stsanz earned 70 total points
ID: 1179716
1. Use GetConsoleScreenBufferInfo / FillConsoleOutputCharacter / FillConsoleOutputAttribute
See Q99261 item in Microsoft Knowledge base for an example :
"Performing Clear Screen (CLS) in a Console Application"
http://support.microsoft.com/support/kb/articles/q99/2/61.asp

2. Use SetConsoleCursorPosition

3. Use SetConsoleTextAttribute

4. I'm afraid you can't draw graphs on a console screen because it is devoted to text character output.

For more info, see also WriteConsoleXXX functions.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question