Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comdlg32/colordlg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index 7ab5efd0962..d5254736b24 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -523,6 +523,7 @@ static void CC_PaintCross(CCPRIV *infoPtr) int wc = GetDialogBaseUnits() * 3 / 4; RECT rect; POINT point, p; + HRGN region; HPEN hPen; int x, y;
@@ -531,7 +532,9 @@ static void CC_PaintCross(CCPRIV *infoPtr)
GetClientRect(hwnd, &rect); hDC = GetDC(hwnd); - SelectClipRgn( hDC, CreateRectRgnIndirect(&rect)); + region = CreateRectRgnIndirect(&rect); + SelectClipRgn(hDC, region); + DeleteObject(region);
point.x = ((long)rect.right * (long)x) / (long)MAXHORI; point.y = rect.bottom - ((long)rect.bottom * (long)y) / (long)MAXVERT;