mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 12:18:13 +00:00
fixed FillRect() to properly handle system color constants (thanks to Royce for spotting this bug)
svn path=/trunk/; revision=9447
This commit is contained in:
parent
f44bcb1cdb
commit
0a242842b2
|
@ -45,6 +45,8 @@
|
||||||
#define SPI_SETFOCUSBORDERWIDTH (8207)
|
#define SPI_SETFOCUSBORDERWIDTH (8207)
|
||||||
#define SPI_GETFOCUSBORDERHEIGHT (8208)
|
#define SPI_GETFOCUSBORDERHEIGHT (8208)
|
||||||
#define SPI_SETFOCUSBORDERHEIGHT (8209)
|
#define SPI_SETFOCUSBORDERHEIGHT (8209)
|
||||||
|
#define COLOR_MENUHILIGHT (29)
|
||||||
|
#define COLOR_MENUBAR (30)
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
|
@ -1823,13 +1825,18 @@ INT STDCALL
|
||||||
FillRect(HDC hDC, CONST RECT *lprc, HBRUSH hbr)
|
FillRect(HDC hDC, CONST RECT *lprc, HBRUSH hbr)
|
||||||
{
|
{
|
||||||
HBRUSH prevhbr;
|
HBRUSH prevhbr;
|
||||||
if ((DWORD)hbr < 0x4000)
|
|
||||||
hbr = GetSysColorBrush((DWORD)hbr);
|
if (hbr <= (HBRUSH)(COLOR_MENUBAR + 1))
|
||||||
if ((prevhbr = SelectObject(hDC, hbr)) == NULL)
|
{
|
||||||
|
hbr = GetSysColorBrush((int)hbr - 1);
|
||||||
|
}
|
||||||
|
if ((prevhbr = NtGdiSelectObject(hDC, hbr)) == NULL)
|
||||||
|
{
|
||||||
return FALSE;
|
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);
|
lprc->bottom - lprc->top, PATCOPY);
|
||||||
SelectObject(hDC, prevhbr);
|
NtGdiSelectObject(hDC, prevhbr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue