From 414f3da7a62f5ce6d066ef135fc15681361a7495 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sat, 9 Dec 2023 05:00:39 +0900 Subject: [PATCH] [COMCTL32] IP Address control: Fix background drawing (#6133) Based on KRosUser's suggestion. bgCol is a COLORREF value, not a color index. Create a brush from bgCol. CORE-9853 --- dll/win32/comctl32/ipaddress.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dll/win32/comctl32/ipaddress.c b/dll/win32/comctl32/ipaddress.c index 42a016b55fe..aa2b6efc41d 100644 --- a/dll/win32/comctl32/ipaddress.c +++ b/dll/win32/comctl32/ipaddress.c @@ -178,7 +178,15 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) fgCol = comctl32_color.clrGrayText; } +#ifdef __REACTOS__ + { + HBRUSH brush = CreateSolidBrush(bgCol); + FillRect(hdc, &rect, brush); + DeleteObject(brush); + } +#else FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1)); +#endif DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); }