- BOOL escape_pressed() // return TRUE if escape pressed{ MSG msg;
- // check for messages and remove from queue
- if (::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) && msg.message == WM_KEYDOWN) {
- if (VK_ESCAPE == msg.wParam) // escape pressed return TRUE; } return FALSE;}