Vincent Povirk <[EMAIL PROTECTED]> writes:

> +/* process messages for 1 second */
> +static void do_events(void)
> +{
> +    MSG msg;
> +    UINT_PTR timerid;
> +    
> +    timerid = SetTimer(NULL, 0, 1000, NULL);
> +    while (GetMessageW(&msg, NULL, 0, 0) &&
> +        !(msg.message == WM_TIMER && msg.hwnd == NULL && msg.wParam == 
> timerid))
> +    {
> +        TranslateMessage(&msg);
> +        DispatchMessageW(&msg);
> +    }
> +    
> +    KillTimer(NULL, timerid);

You shouldn't do it that way, it makes the test much slower than
necessary. If you really have to wait for async events you should use
something like flush_events() in the message tests, though in this case
it doesn't seem necessary at all since you don't check the resulting
messages.

-- 
Alexandre Julliard
[EMAIL PROTECTED]


Reply via email to