Jose's Read Only Forum 2023

General Category => General Discussion => Topic started by: James C. Fuller on October 29, 2009, 01:38:43 PM

Title: GetMessage
Post by: James C. Fuller on October 29, 2009, 01:38:43 PM
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
Title: Re: GetMessage
Post by: José Roca on October 29, 2009, 04:25:57 PM
 
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.