简体   繁体   中英

kbhit equivalent for Windows CE

I know this question has been asked before and I have tried searching on Google but I don't seem to be able to find a decent answer to this.

I want a console application I am writing to exit when a user presses a button. It's written in C++ and will be deployed on Windows CE6.

Currently the same code, on XP, uses this to perform actions until the keyboard is hit

//App entry
while (!_kbhit()) { /* Awesome code goes here */ }
//App exits here

Can anyone help me :)

Have you tried getchar() ?

It may be necessary to direct standard input/output to the console using SetStdioPathW() .

-PaulH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM