Re: [PATCH 3/6] shell32: add tests for SHAppBarMessage
Vincent Povirk <vincent(a)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(a)winehq.org
participants (1)
-
Alexandre Julliard