/* General message loop. Retrieves and processes a message from the OWL application's message queue. Calls ProcessAppMsg to allow special handling of the message. If not specially handled, performs default processing of the message, dispatching the message to the TWindowsObject's window procedure. All unusual processing can be accomplished by redefining ProcessAppMsg or any of the Process... functions. */ void TApplication::MessageLoop() { MSG Message; while ( TRUE ) { if ( PeekMessage(&Message, 0, 0, 0, PM_REMOVE) ) { if ( Message.message == WM_QUIT ) break; if ( !ProcessAppMsg(&Message) ) { TranslateMessage(&Message); DispatchMessage(&Message); } } else // No message waiting. IdleAction(); } Status = Message.wParam; }
// // Handler for the timer event. // Closes the window. // void TPropertySheet::EvTimer(uint timerId) { if(timerId == TimerID) IdleAction(0); }