Is there no yield function?

There's a big article on MSDN here about PeekMessage/GetMessage