Listview R5

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

 




ChangeLog
  Remember the global colors in custom draw mode.

--- dlls/comctl32/listview.c.R4	Wed Oct 16 08:45:38 2002
+++ dlls/comctl32/listview.c	Wed Oct 16 08:53:38 2002
@@ -3471,7 +3471,7 @@
 static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc)
 {
     UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
-    COLORREF oldTextColor;
+    COLORREF oldTextColor, oldClrTextBk, oldClrText;
     NMLVCUSTOMDRAW nmlvcd;
     HFONT hOldFont;
     DWORD cdmode;
@@ -3487,12 +3487,19 @@
     oldBkMode = GetBkMode(hdc);
     infoPtr->clrTextBkDefault = GetBkColor(hdc);
     oldTextColor = GetTextColor(hdc);
+
+    oldClrTextBk = infoPtr->clrTextBk;
+    oldClrText   = infoPtr->clrText;
    
     GetClientRect(infoPtr->hwndSelf, &rcClient);
     customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, NULL);
     cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd);
     if (cdmode & CDRF_SKIPDEFAULT) goto enddraw;
 
+    /* Use these colors to draw the items */
+    infoPtr->clrTextBk = nmlvcd.clrTextBk;
+    infoPtr->clrText = nmlvcd.clrText;
+
     /* nothing to draw */
     if(infoPtr->nItemCount == 0) goto enddraw;
 
@@ -3514,7 +3521,9 @@
     if (cdmode & CDRF_NOTIFYPOSTPAINT)
 	notify_customdraw(infoPtr, CDDS_POSTPAINT, &nmlvcd);
 
-    /* unselect objects */
+    infoPtr->clrTextBk = oldClrTextBk;
+    infoPtr->clrText = oldClrText;
+
     SelectObject(hdc, hOldFont);
     SetBkMode(hdc, oldBkMode);
     SetBkColor(hdc, infoPtr->clrTextBkDefault);



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

  Powered by Linux