• Advertisement

Archived

This topic is now archived and is closed to further replies.

C/C++ WIN32 Console, Turn Cursor Off?

This topic is 5210 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

hi, i was wondering if there is anyway to turn the cursor off in my Win32 Console program.. using c/c++ Thanks Much!!

Share this post


Link to post
Share on other sites
Advertisement

HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CCI;
GetConsoleCursorInfo(hOut, &CCI);
CCI.bVisible = false;
SetConsoleCursorInfo(hOut, &CCI);

EDIT: Forgot a line

-- Sorcerer --

[edited by - TheSorcerer on November 15, 2003 3:11:37 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Ah this is interesting to me, I was going to ask something about the console. Last night I accidently discovered you could run it in full screen mode, by one of the buttons at the top, I wanted to know a bit more about it, so I looked on properties (right click - properties) and found a whole lot of ms-dos tabs/commands, you can do various things in there, (there is more), I found it would only go to full screen for that go, but the next time you started it, it would run in normal mode again. I wanted to find out more, the ms-dos name of the console is "conagent.exe" and that is in the windows>system directory, if you go to this and do the properties there you can change a whole lot of settings including getting the console to come up full screen every time, like a proper dos screen , you can also change it back as well if you want.
I would also be interested in any commands you can include in your program as well to do these things, so you could have it come up normal or full screen when you want rather thn one or the other?

Share this post


Link to post
Share on other sites
quote:
Original post by TheSorcerer

HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CCI;
GetConsoleCursorInfo(hOut, &CCI);
CCI.bVisible = false;
SetConsoleCursorInfo(hOut, &CCI);

EDIT: Forgot a line


thank you very much!

Share this post


Link to post
Share on other sites
That code actually works!!! I''ve been trying to figure out how to turn the cursor off for a year now. But thanks to you my problems are finally solved!

Share this post


Link to post
Share on other sites

  • Advertisement