// Abort procedure used for printing BOOL FAR PASCAL _export AbortProc(HDC, short) { MSG Msg; while (!UserAbort && PeekMessage(&Msg, NULL, NULL, NULL, PM_REMOVE)) if (!ProcessAppMsg(&Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } return (!UserAbort); }
/* 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; }