Winapi ListView Header Separator and Cell Alignment Problem LVS_EX_GRIDLINES

I am using a ListView control in a dialog box whose visual style is set to LV_VIEW_DETAILS(report view) and the advanced visual style is set to LVS_EX_GRIDLINES. When executed on Windows 10, the result I get:

Alignment problem

As you can see, the header separators and the vertical lines of the cells surrounding the elements are not aligned. There is also no border between the title and the first line.

The problem is also clearly visible in programs that use the same control, for example WinRAR:

Alignment problem

Is there an easy way to fix this?

+4
source share

Source: https://habr.com/ru/post/1607164/


All Articles