Commit in reactos/lib/user32/windows on MAIN
draw.c+12-51.40 -> 1.41
fixed FillRect() to properly handle system color constants (thanks to Royce for spotting this bug)

reactos/lib/user32/windows
draw.c 1.40 -> 1.41
diff -u -r1.40 -r1.41
--- draw.c	1 May 2004 11:38:27 -0000	1.40
+++ draw.c	20 May 2004 14:12:21 -0000	1.41
@@ -45,6 +45,8 @@
 #define SPI_SETFOCUSBORDERWIDTH	(8207)
 #define SPI_GETFOCUSBORDERHEIGHT	(8208)
 #define SPI_SETFOCUSBORDERHEIGHT	(8209)
+#define COLOR_MENUHILIGHT	(29)
+#define COLOR_MENUBAR	(30)
 
 /* GLOBALS *******************************************************************/
 
@@ -1823,13 +1825,18 @@
 FillRect(HDC hDC, CONST RECT *lprc, HBRUSH hbr)
 {
    HBRUSH prevhbr;
-   if ((DWORD)hbr < 0x4000)
-      hbr = GetSysColorBrush((DWORD)hbr);
-   if ((prevhbr = SelectObject(hDC, hbr)) == NULL)
+   
+   if (hbr <= (HBRUSH)(COLOR_MENUBAR + 1))
+   {
+      hbr = GetSysColorBrush((int)hbr - 1);
+   }
+   if ((prevhbr = NtGdiSelectObject(hDC, hbr)) == NULL)
+   {
       return FALSE;
-   PatBlt(hDC, lprc->left, lprc->top, lprc->right - lprc->left,
+   }
+   NtGdiPatBlt(hDC, lprc->left, lprc->top, lprc->right - lprc->left,
       lprc->bottom - lprc->top, PATCOPY);
-   SelectObject(hDC, prevhbr);
+   NtGdiSelectObject(hDC, prevhbr);
    return TRUE;
 }
 
CVSspam 0.2.8