[PATCH 3/6] shell32: add tests for SHAppBarMessage
Alexandre Julliard
julliard at winehq.org
Thu Sep 4 06:43:42 CDT 2008
Vincent Povirk <vincent at codeweavers.com> 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
julliard at winehq.org
More information about the wine-devel
mailing list