|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Keydown in Windows Console?
Hey-
You can use a function that won't wait by doing something like this:
//This may need a little tweaking
int KbHit()
{
int key;
if (kbhit())
key = getch(); //This will only getch() if one is available
return key;
}
Hope this helps.
-Brian
>Hello GameProgrammer!
>
>First of all, thanx everyone who has helped me before... I can't believe
>I
>survived so long without a mailing list :-)
>
>Now for the problem, a quick one:
>if you create a console app (in Borland C++ Builder 3), and use the
>function GetAsyncKeyState(VK_CODE); will it work? It sure
>doesn't seem to.
>I have tried to get input with getch(); but then the program will wait
>for input and I want it to be real-time! The help files for Borland is
>somewhat obscure by my opinion...
>
>
>Thankyou!
>David
>
>=================================================================
>The GameProgrammer.Com mailing list is for the open discussion
>of any topic related to the art, science, and business of
>programming games. This list is especially tolerant of beginners.
>We were all beginners once
>
>To SUBSCRIBE or UNSUBSCRIBE please visit:
>http://gameprogrammer.com/mailinglist.html
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html
|
|