Waiting for input?
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
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
..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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement