[ros-dev] RE: [ros-diffs] [mbosma] 20543: fix typos.

Thomas Weidenmueller w3seek at reactos.com
Tue Jan 3 14:53:21 CET 2006


Murphy, Ged (Bolton) wrote:
> This should really be
>  
> while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
>  
> as GetMessage returns <0 on failure.
> It will then break on failure or WM_QUIT
>  
>  Just being anal though as GetMessage should never really fail  ;)

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/MessagesandMessageQueues/MessagesandMessageQueuesReference/MessagesandMessageQueuesFunctions/GetMessage.asp

The loop shouldn't be broken if GetMessage returns -1.

- Thomas


More information about the Ros-dev mailing list