When repainting a static control, with SS_BITMAP style, do not erase
the background. Keep sending the WM_CTLCOLORSTATIC notification as Windows does.
This commit is contained in:
parent
1a9ab88fe3
commit
b64c89c59a
|
@ -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 )))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue