Announcement

Collapse
No announcement yet.

ListView Gridlines and KB813791

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kev Peel
    replied
    XP has two versions of the common controls - 5.82 and 6.00. You can only use v6.00 (which I think are in user32.dll) if you include a themes manifest XML with your application. Microsoft seem to have done it this way for backwards compatibility with apps that expect the old-style non-themed look.

    Leave a comment:


  • Carlo Pagani
    replied
    Where do you get Comctl32.dll V6.0

    I have all the updates on my XP (IE 7 as well) and my Comctl32.dll is 5.82.2900.2982

    Leave a comment:


  • Roger Garstang
    replied
    When using ownerdata the first column also doesn't autosize right. Fixed in Vista of course, along with a new style to make the control always autosize. I guess that and DirectX 10 they are using to get you to switch.

    Leave a comment:


  • Kev Peel
    started a topic ListView Gridlines and KB813791

    ListView Gridlines and KB813791

    Here's a quick "heads up" because this problem had me headscratching for quite a while

    When XP's "smooth scrolling" is enabled and you are using a ListView control which has the LVS_EX_GRIDLINES extended style, the gridlines will print over the text and actually get corrupted when the list is scrolled vertically. As far as I know, this only affects Windows XP versions (so only about 70-80% of all computers )

    This is a recognised problem with the control, and the workaround mentioned by Microsoft in http://support.microsoft.com/kb/813791, (which says to use SystemParametersInfo to disable the smooth scrolling) does NOT work according to my tests. I couldn't even get the ListView to repaint properly by subclassing and intercepting the WM_VSCROLL messages, and subclassing is not really preferred option.

    So if anyone comes across this, my advice for you is to avoid LVS_EX_GRIDLINES on large lists and use custom draw to color the row backgrounds separately (I use alternating colors for every second item).
Working...
X