Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Console App

Posted on 1998-12-09
1
Medium Priority
?
285 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 280 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

618 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