Archived

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

Dwarf with Axe

Waiting for input?

Recommended Posts

I guess I forgot how, but what is a simple way to wait for input? Say, if I want to stop my program, and just wait... Then when the player pushes something, continue... I think I did forget... It''s the ale I tell ya, ~Dwarf

Share this post


Link to post
Share on other sites
You can use the WM_CHAR message and do something like this

..in your windows message code...
case WM_CHAR:
switch (wParam) {
case 'q':
//shutdown everything
PostQuitMessage(0);
break;
} //end of switch for key contents
break;

you can also throw in a toggle flag and make the app pause as well.
but if you are using DirectInput then you cannot use this method..just whip up something similiar


Edited by - GoofProg on January 12, 2002 1:48:19 AM

Share this post


Link to post
Share on other sites