Re: listbox: ownerdraw fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 17, 2003 at 09:59:20AM -0500, Dimitrie O. Paun wrote:
> Why not simply invalidate rect always, even when not in owner draw?

Works for me.

      Aric Stewart <aric@xxxxxxxxxxxxxxx>
      invalidate items on setselection.
-- 
Huw Davies
huw@xxxxxxxxxxxxxxx
Index: controls/listbox.c
===================================================================
RCS file: /home/wine/wine/controls/listbox.c,v
retrieving revision 1.97
diff -u -r1.97 listbox.c
--- controls/listbox.c	14 Oct 2003 05:24:21 -0000	1.97
+++ controls/listbox.c	17 Nov 2003 15:13:31 -0000
@@ -1143,6 +1143,13 @@
     }
 }
 
+static void LISTBOX_InvalidateItemRect( HWND hwnd, LB_DESCR *descr, INT index )
+{
+    RECT rect;
+
+    if (LISTBOX_GetItemRect( descr, index, &rect ) == 1)
+        InvalidateRect( hwnd, &rect, TRUE );
+}
 
 /***********************************************************************
  *           LISTBOX_GetItemHeight
@@ -1361,7 +1368,7 @@
         {
             if (descr->items[i].selected) continue;
             descr->items[i].selected = TRUE;
-            LISTBOX_RepaintItem( hwnd, descr, i, ODA_SELECT );
+            LISTBOX_InvalidateItemRect(hwnd, descr, i);
         }
         LISTBOX_SetCaretIndex( hwnd, descr, last, TRUE );
     }
@@ -1371,7 +1378,7 @@
         {
             if (!descr->items[i].selected) continue;
             descr->items[i].selected = FALSE;
-            LISTBOX_RepaintItem( hwnd, descr, i, ODA_SELECT );
+            LISTBOX_InvalidateItemRect(hwnd, descr, i);
         }
     }
     return LB_OKAY;


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux