When I re-size any column of clistctrl
(with report view) which is loaded with UxTheme.dll
, it creates patches at the end of all the items(as shown in the image below 'Item 4').
Why does these patches occur and how to avoid those patches?
This is a painting issue. What you're calling "patches" are artifacts that remain on-screen from the column divider line being moved.
You say that the problem is connected to the loading of the library UxTheme.dll. That implies you're setting the Explorer theme for your ListView control. That theme is designed to be used with double buffering. To accomplish that, you need to set the LVS_EX_DOUBLEBUFFER
extended style flag for the control.
myListCtrl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER);