Jump to content
  • Advertisement

Archived

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

H4ck3r

Moving/hiding cursor in C

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

I have a text printed in my screen. Without clearing the screen, I want to overwrite this text with printf (When I clear it first, it goes far too slow). So I have to move the cursor to the begining of the screen, and then printf. How can I do this? And when I do this, You''ll probably see the cursor moving around the screen very fast. I dont want this, so Ill have to hide the cursor. How can I do this? 10x, H4ck3r

Share this post


Link to post
Share on other sites
Advertisement
Check out the API documention on Character-mode programs. It provides you with a bunch of functions for input, output, and most imporantly, manipulating the cursor position, and even changing text color. It might be a bit extra work to get it set up, because you have to work with handles and prepare buffers and menial tasks like that, but the control it gives you is more than the standard IO can give you.

[edited by - Zipster on March 31, 2003 3:53:45 AM]

Share this post


Link to post
Share on other sites
I don''t think that will work, since im using C and not C++ (in openBSD). Ill have a look later, tho.

But for if it doesn''t work: Anyone has another idea?

BTW: I posted it in EVERY question that I used openBSD, but of course, I forgot it where it was necesairy. Stupid, stupid me :@

Share this post


Link to post
Share on other sites
in borland turbo c++ 3.0, there is a function called _setcursortype (something like that), try to see if your compiler has it.


Current project: 2D in Direct3D engine.
% completed: ~35%
Status: Active.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!