Depending on the theme, if there was a header, the border ends up painted lower than it should be, and clipped by the header. 7-Zip file manager, the reason why the offset was added in 5f0dcf79185941c4faff35d1cc9c758160f3a27d in the first place, still renders correctly. Before:  After:  EDIT1: Actually compared screenshots of 7-Zip file manager and looks like the headers are now painted consistently after highlighting them.   -- v3: comctl32/listview: Exclude header area in WM_NCPAINT. https://gitlab.winehq.org/wine/wine/-/merge_requests/1878