ListView - add CACHEHINT notification in OwnerData mode

Vitaliy Margolen wine-patch at kievinfo.com
Sat Mar 22 15:21:51 CST 2003


List view should sent LVN_ODCACHEHINT notification before paint when it's virtual list
(LVS_OWNERDATA style). We were sending it only in OwnerDraw.

Vitaliy Margolen


changelog:
  dlls/comctrl32/listview.c
  - send LVN_ODCACHEHINT notification for LVS_OWNERDATA style in report and list modes


Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.345
diff -u -r1.345 listview.c
--- dlls/comctl32/listview.c    15 Mar 2003 00:05:46 -0000      1.345
+++ dlls/comctl32/listview.c    22 Mar 2003 21:14:40 -0000
@@ -3729,6 +3729,18 @@
     /* figure out what we need to draw */
     iterator_visibleitems(&i, infoPtr, hdc);
     
+    /* send cache hint notification */
+    if (infoPtr->dwStyle & LVS_OWNERDATA)
+    {
+       RANGE range = iterator_range(&i);
+        NMLVCACHEHINT nmlv;
+
+       ZeroMemory(&nmlv, sizeof(NMLVCACHEHINT));
+        nmlv.iFrom = range.lower;
+        nmlv.iTo   = range.upper - 1;
+        notify_hdr(infoPtr, LVN_ODCACHEHINT, &nmlv.hdr);
+    }
+
     /* iterate through the invalidated rows */
     while(iterator_next(&i))
     {
@@ -3777,6 +3789,18 @@
     /* figure out what we need to draw */
     iterator_visibleitems(&i, infoPtr, hdc);
     
+    /* send cache hint notification */
+    if (infoPtr->dwStyle & LVS_OWNERDATA)
+    {
+       RANGE range = iterator_range(&i);
+        NMLVCACHEHINT nmlv;
+
+       ZeroMemory(&nmlv, sizeof(NMLVCACHEHINT));
+        nmlv.iFrom = range.lower;
+        nmlv.iTo   = range.upper - 1;
+        notify_hdr(infoPtr, LVN_ODCACHEHINT, &nmlv.hdr);
+    }
+
     while(iterator_prev(&i))
     {
        LISTVIEW_GetItemOrigin(infoPtr, i.nItem, &Position);




More information about the wine-patches mailing list