Listview N2

Dimitrie O. Paun dpaun at rogers.com
Thu Oct 10 09:41:37 CDT 2002


ChangeLog
  Implement WM_SETREDRAW properly.

--- dlls/comctl32/listview.c.N1	Thu Oct 10 01:45:42 2002
+++ dlls/comctl32/listview.c	Thu Oct 10 10:37:41 2002
@@ -153,6 +153,7 @@
   HFONT hFont;
   INT ntmHeight;		/*  from GetTextMetrics from above font */
   INT ntmAveCharWidth;		/*  from GetTextMetrics from above font */
+  BOOL bRedraw;
   BOOL bFocus;
   INT nFocusedItem;
   RECT rcFocus;
@@ -883,10 +884,11 @@
 /******** Internal API functions ************************************/
 
 /* The Invalidate* are macros, so we preserve the caller location */
-#define LISTVIEW_InvalidateRect(infoPtr, rect) do { \
+#define LISTVIEW_InvalidateRect(infoPtr, rect) while(infoPtr->bRedraw) { \
     TRACE(" invalidating rect=%s\n", debugrect(rect)); \
     InvalidateRect(infoPtr->hwndSelf, rect, TRUE); \
-} while (0)
+    break;\
+}
 
 #define LISTVIEW_InvalidateItem(infoPtr, nItem) do { \
     RECT rcItem; \
@@ -8115,12 +8117,11 @@
  */
 static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw)
 {
-    /* FIXME: this is bogus */
-    LRESULT lResult = DefWindowProcW(infoPtr->hwndSelf, WM_SETREDRAW, bRedraw, 0);
+    infoPtr->bRedraw = bRedraw;
     if(bRedraw)
         RedrawWindow(infoPtr->hwndSelf, NULL, 0,
             RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ALLCHILDREN | RDW_ERASENOW);
-    return lResult;
+    return 0;
 }
 
 /***




More information about the wine-patches mailing list