Author: rharabien
Date: Sat Apr 30 21:41:15 2011
New Revision: 51510
URL:
http://svn.reactos.org/svn/reactos?rev=51510&view=rev
Log:
[COMCTL32]
* Properly support WM_SYSCOLORCHANGE in ListView controls with default background. Should
be sent to Wine (tm)
Modified:
trunk/reactos/dll/win32/comctl32/listview.c
Modified: trunk/reactos/dll/win32/comctl32/listview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Sat Apr 30 21:41:15 2011
@@ -315,6 +315,7 @@
COLORREF clrBk;
COLORREF clrText;
COLORREF clrTextBk;
+ BOOL bDefaultBkColor;
/* font */
HFONT hDefaultFont;
@@ -7870,7 +7871,8 @@
static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk)
{
TRACE("(clrBk=%x)\n", clrBk);
-
+
+ infoPtr->bDefaultBkColor = FALSE;
if(infoPtr->clrBk != clrBk) {
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
infoPtr->clrBk = clrBk;
@@ -9263,6 +9265,7 @@
infoPtr->clrText = CLR_DEFAULT;
infoPtr->clrTextBk = CLR_DEFAULT;
LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
+ infoPtr->bDefaultBkColor = TRUE;
/* set default values */
infoPtr->nFocusedItem = -1;
@@ -11525,6 +11528,11 @@
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
+ if (infoPtr->bDefaultBkColor)
+ {
+ LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
+ infoPtr->bDefaultBkColor = TRUE;
+ }
return 0;
/* case WM_TIMER: */