Jinoh Kang (@iamahuman) commented about dlls/user32/tests/msg.c:
+ check_lb_state(listbox, 0, LB_ERR, 0, 0); + + flush_sequence(); + + log_all_parent_messages++; + log_painting_messages++; + + ret = GetWindowLongA(listbox, GWL_STYLE); + ok((ret & (WS_VSCROLL | WS_HSCROLL)) == 0, "Listbox should not have scroll bars\n"); + + ret = SendMessageA(listbox, LB_SETCOUNT, 100, 0); + ok(ret == 0, "got %Id\n", ret); + ret = GetWindowLongA(listbox, GWL_STYLE); + ok((ret & (WS_VSCROLL | WS_HSCROLL)) == WS_VSCROLL, "Listbox should have vertical scroll bar\n"); + + SendMessageA(listbox, WM_USER, 0, 0); /* Mark */ [MSDN][wu] says WM\_USER is reserved for use in class-specific messages, so I'd shy away from using it for predefined controls like ListBox. I cannot find a precedent for using WM\_USER as a marker in msg.c either.
Of course we could find guaranteed-unused ID or split seq, but I have a better idea: how about we test the invalidation / update region directly? We could use GetUpdateRect() or GetUpdateRgn() for that. Should be less flaky too. [wu]: <https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-user> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7893#note_102642