[WINESYNC][WORDPAD] paint_ruler(): Use GetSysColorBrush()
authorZebediah Figura <z.figura12@gmail.com>
Sat, 20 Apr 2019 03:39:14 +0000 (22:39 -0500)
committerStanislav Motylkov <x86corez@gmail.com>
Mon, 21 Nov 2022 20:08:27 +0000 (23:08 +0300)
Import wine-4.7 commit:
https://source.winehq.org/git/wine.git/commit/dcd9376ae711d56778032f146480e1d1aaf245ef

Follow-up to 0.4.15-dev-5248-g be014129a57.

base/applications/wordpad/print.c

index dc219c8..ec510e2 100644 (file)
@@ -381,10 +381,9 @@ static void paint_ruler(HWND hWnd, LONG EditLeftmost, BOOL NewMetrics)
     HDC hdcPrint = make_dc();
     RECT printRect = get_print_rect(hdcPrint);
     RECT drawRect;
-    HBRUSH hBrush = CreateSolidBrush(GetSysColor(COLOR_MENU));
 
     GetClientRect(hWnd, &drawRect);
-    FillRect(hdc, &drawRect, hBrush);
+    FillRect(hdc, &drawRect, GetSysColorBrush(COLOR_MENU));
 
     InflateRect(&drawRect, 0, -3);
     drawRect.left = EditLeftmost;
@@ -404,7 +403,6 @@ static void paint_ruler(HWND hWnd, LONG EditLeftmost, BOOL NewMetrics)
     add_ruler_units(hdc, &drawRect, NewMetrics, EditLeftmost);
 
     SelectObject(hdc, GetStockObject(BLACK_BRUSH));
-    DeleteObject(hBrush);
     DeleteDC(hdcPrint);
     EndPaint(hWnd, &ps);
 }