View Full Version : Console application?
07-10-2001, 09:44 PM
I know this does not exactly belong here, but anyway: When using the Win32 Console application (NOT win32 application!), with MS Visual C++, how to change the cursor position?(when outputting with printf)
I need the console for writing out some data and I don't like the idea of rewriting the whole screen always when one number changes its value.
Thanks in advance
There is no way to do this , sorry ;-((
You must output the whole **** again.......
07-11-2001, 05:11 AM
That's not exactly true, there are a few ways to do that in fact. For one, you can send formatting characters to make the cursor back up a character or a whole line (you can also make it move forward and down obviously). The other way to do it is by directly manipulating coordinates in memory the way old DOS programs did (though that may produce an access violation these days). Or you can get a Win32 handle to your console (see http://support.microsoft.com/support/kb/articles/Q104/0/94.asp )and use that handle with the SetConsoleCursorPosition command to set the position. Another way is by using the appropriate BIOS INT (see http://www.htl-steyr.ac.at/~_morg/pcinfo/hardware/interrupts/inte6o1c.htm )
07-12-2001, 10:35 PM
thanks for your help, the bios stuff doesnt work (maybe I am giving a wrong page number..), but the opening of the console handle seem to work. Thanx http://www.opengl.org/discussion_boards/ubb/biggrin.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.