From dd426f79b352bc6257f2dfa45224b6059d810879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 15 Aug 2003 17:06:11 +0000 Subject: [PATCH] Handle SysColor background brushes svn path=/trunk/; revision=5589 --- reactos/lib/user32/windows/defwnd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index d5ce7e5367d..a9f26b244b2 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -1,4 +1,4 @@ -/* $Id: defwnd.c,v 1.66 2003/08/15 10:51:23 rcampbell Exp $ +/* $Id: defwnd.c,v 1.67 2003/08/15 17:06:11 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -1676,6 +1676,14 @@ User32DefWindowProc(HWND hWnd, RECT Rect; HBRUSH hBrush = (HBRUSH)GetClassLongW(hWnd, GCL_HBRBACKGROUND); + if (NULL == hBrush) + { + return 0; + } + if (((DWORD) hBrush) <= 25) + { + hBrush = GetSysColorBrush((DWORD) hBrush - 1); + } GetClipBox((HDC)wParam, &Rect); FillRect((HDC)wParam, &Rect, hBrush); return(1);