-
Console size
I'm working on a program and I want to display more lines than what the console seems to support... I believe it has 20 lines, and I need 38 or so, as seen in
http://www.winntmag.com/Files/301/Screen_01.gif
I don't want it to scroll offscreen.
Is there any way to do this?
Also, how do I get rid of the flashing underscore (cursor)?
-
Code:
COORD ScreenSize = {80,50};
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE),ScreenSize);
Will change the console (assuming your in Win32) size to 50 rows (rather than 25)
And...
Code:
void HideCursor()
{
CONSOLE_CURSOR_INFO lpCursor;
lpCursor.bVisible = 0;
lpCursor.dwSize = 20;
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&lpCursor);
}
Will hide the cursor (blinking underscore)
Don't forget to #include <windows.h> !
-
Oh!
And this will disable mouse input, thereby removing the mouse cursor in the console...
Code:
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT);
This requires windows.h too.
-
THANK YOU!!!
-
-
No, it didn't, that's why he's thanking you:p
-
IT DIDN'T!?!?
*tosses banana into the air*
-
It worked perfect. I'll show you what I was working on when I finish the Windows 98 version... The XP/2000 version is ready.
-
-
Its really not that great... all it does is display the BSOD and password protect your computer. I don't know how to disable the alt-enter, though. I'll try disabling enter.