Page 1 of 1

How to create a WaitForKeyPressed function

PostPosted: May 23, 2007 @ 12:02am
by Staryon

PostPosted: May 23, 2007 @ 2:32am
by Dan East

PostPosted: May 23, 2007 @ 3:39pm
by Staryon
Thanks a lot, Dan.

PostPosted: May 23, 2007 @ 5:00pm
by Dan East
Oh, one side note. You'll see GetMessage's BOOL return value is not actually treated as boolean. That's Microsoft's strangeness there. It's -1 if an error occurred, 0 if WM_QUIT was received, and 1 if success.

Dan East

PostPosted: May 31, 2007 @ 1:22am
by Antony
You can get the error returned using the GetLastError function.

And just to be correct (you might say pedantic) the return is non-zero for success.