The application can detect the error situation after the WinGetMsg or the WinPeekMsg function and before the WinDispatchMsg function.