From b64c89c59af129c6926deb066d327bdd75f00f04 Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Tue, 25 May 2004 04:03:21 +0000 Subject: [PATCH] When repainting a static control, with SS_BITMAP style, do not erase the background. Keep sending the WM_CTLCOLORSTATIC notification as Windows does. --- controls/static.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/controls/static.c b/controls/static.c index 70eba740637..34883726919 100644 --- a/controls/static.c +++ b/controls/static.c @@ -555,15 +555,12 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style ) static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style ) { - RECT rc; - HBRUSH hbrush; HDC hMemDC; HBITMAP hBitmap, oldbitmap; - GetClientRect( hwnd, &rc ); - hbrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, + /* message is still sent, even if the returned brush is not used */ + SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd ); - FillRect( hdc, &rc, hbrush ); if ((hBitmap = (HBITMAP)GetWindowLongA( hwnd, HICON_GWL_OFFSET ))) {