Jump to content
  • Advertisement

Archived

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

CoderX

Quick Windows Console question

This topic is 5952 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 guys, I have this console app runnning and it seems that windows only processes it whenever the keyboard is pressed or the mouse is moving inside the console window. How can I make it be active all the time? I have this while loop which draws characters on screen, and it only does it when the mouse is moved inside or keybaord is pressed.

Share this post


Link to post
Share on other sites
Advertisement
Try this above your input:


if(WAIT_TIMEOUT == WaitForSingleObject(hInput, 20))



Jeff D

Share this post


Link to post
Share on other sites
Thanks, I tried your code and it wouldn''t accept any input so I went to MSDN and checked it out, and replaced it with WAIT_OBJECT_0 and now it works fine. I know how it works but still confused as to why it wouldn''t do that in the first place.

Thanks again.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!