[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
This commit is contained in:
Katayama Hirofumi MZ 2023-12-09 05:00:39 +09:00 committed by GitHub
parent e5c5efe2ad
commit 414f3da7a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,15 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
fgCol = comctl32_color.clrGrayText; 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)); FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1));
#endif
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
} }