LISTVIEW_ApproximateViewRect

Aric Stewart aric at codeweavers.com
Wed Feb 18 20:51:21 CST 2004


changelog: Implemented LISTVIEW_ApproximateViewRect for LVS_REPORT.

lgpl
-------------- next part --------------
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.382
diff -u -w -r1.382 listview.c
--- dlls/comctl32/listview.c	17 Feb 2004 22:47:51 -0000	1.382
+++ dlls/comctl32/listview.c	19 Feb 2004 02:56:23 -0000
@@ -4000,7 +4000,26 @@
     dwViewRect = MAKELONG(wWidth, wHeight);
   }
   else if (uView == LVS_REPORT)
-    FIXME("uView == LVS_REPORT: not implemented\n");
+  {
+    RECT rcBox;
+
+    if (infoPtr->nItemCount > 0)
+    {
+	  LISTVIEW_GetItemBox(infoPtr, 0, &rcBox);
+      wWidth = rcBox.right - rcBox.left;
+      wHeight = (rcBox.bottom - rcBox.top) * nItemCount;
+    }
+    else
+    {
+      /* use current height  and width */
+      if (wHeight == 0xffff)
+          wHeight = infoPtr->rcList.bottom - infoPtr->rcList.top;
+      if (wWidth == 0xffff)
+          wWidth = infoPtr->rcList.right - infoPtr->rcList.left;
+    }
+
+    dwViewRect = MAKELONG(wWidth, wHeight);
+  }
   else if (uView == LVS_SMALLICON)
     FIXME("uView == LVS_SMALLICON: not implemented\n");
   else if (uView == LVS_ICON)


More information about the wine-patches mailing list