Replaced GetMessage with PeekMessage, since MsgWaitForMultipleObjects is allowed to return spontaneously.
Attach a file by drag & drop or click to upload