I did a quick search here and on the PowerBASIC board and found most source code does not check for an error condition when calling GetMessage.
http://msdn.microsoft.com/en-us/library/ms644936%28VS.85%29.aspx
Any particular reason for the omission?
James
Nothing, excepting that it is seldom needed. With PB, returning -1 should only happen if the hWnd parameter is invalid, but you should have stopped the program before if you check the result of CreateWindowEx.