Sign in to follow this  

Display Question [C++]

This topic is 4110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

__________________________ | | | Answer Here: | |__________________________| I’m trying to display this in a C++ in a console program. Thing is, I can only get half the box to show up. It ends at the “:”. It’s because I the user needs to input an answer before the program continues to execute and show the rest of the box. (I know you all know that probably, thought I'd put it in). Anyway, what I want to know is: Is there a way to display the entire box with the words in it, but somehow get the “blinking box” (cursor?) back to after Answer Here:? Then, once the user answers, it doesn't show the bottom half of the box again. Thanks to whoever reads this. NOTE: The second verticle line in the second row and the second verticle line in the third row of the box, have a problem. Just picture them where they should be (at the end).

Share this post


Link to post
Share on other sites
I suppose there are ways you could do this, but once you do, you have left the happy world of platform-independence. This is simply not the way that the command prompt works. The command prompt is very procedural, very straightforward - ideally, you do not write just anything anywhere on the screen. Everything comes in order and in a single font and color. The console window is treated as a file, and writing to it is done incrementally. You never move backwards.

Having said that, I'm sure there are ways to bypass this standard functionality. You may be interested in looking at this page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/console_functions.asp

Share this post


Link to post
Share on other sites
Thanks to all who posted a reply. I appreciate it. If found this here : Link

BOOL WINAPI SetConsoleCursorPosition(
HANDLE hConsoleOutput,
COORD dwCursorPosition
);

Im still a beginner to programming for the most part. So I can't really make heads or tails of this. Im gonna look more into it by searching more of that site (thanks for the link by the way v0dKA and drakostar). If anyone can help me out how to read this properly, I would really appreciate it.

Thanks for reading...

Share this post


Link to post
Share on other sites

This topic is 4110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this