diff --git a/rostests/winetests/comctl32/listview.c b/rostests/winetests/comctl32/listview.c index 13c934351d9..2bdbb817718 100644 --- a/rostests/winetests/comctl32/listview.c +++ b/rostests/winetests/comctl32/listview.c @@ -1849,6 +1849,7 @@ static void test_customdraw(void) { HWND hwnd; WNDPROC oldwndproc; + LVITEMA item; hwnd = create_listview_control(LVS_REPORT); @@ -1868,6 +1869,18 @@ static void test_customdraw(void) UpdateWindow(hwnd); ok_sequence(sequences, PARENT_CD_SEQ_INDEX, parent_report_cd_seq, "parent customdraw, LVS_REPORT", FALSE); + /* check colors when item is selected */ + SetWindowLongW(hwnd, GWL_STYLE, GetWindowLongW(hwnd, GWL_STYLE) | LVS_SHOWSELALWAYS); + item.mask = LVIF_STATE; + item.stateMask = LVIS_SELECTED; + item.state = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + InvalidateRect(hwnd, NULL, TRUE); + UpdateWindow(hwnd); + ok_sequence(sequences, PARENT_CD_SEQ_INDEX, parent_report_cd_seq, "parent customdraw, LVS_REPORT, selection", FALSE); + DestroyWindow(hwnd); hwnd = create_listview_control(LVS_LIST);