Commit 0b07bb85 authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

comctl32: Always paint SS_BITMAP static control background with WM_CTLCOLORSTATIC brush.

This is consistent with the behaviour of other static control styles. Signed-off-by: 's avatarJinoh Kang <jinoh.kang.kr@gmail.com>
parent e3ba22e3
......@@ -849,13 +849,16 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style
{
HDC hMemDC;
HBITMAP hBitmap, oldbitmap;
RECT rcClient;
GetClientRect( hwnd, &rcClient );
FillRect( hdc, &rcClient, hbrush );
if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style ))
&& (GetObjectType(hBitmap) == OBJ_BITMAP)
&& (hMemDC = CreateCompatibleDC( hdc )))
{
BITMAP bm;
RECT rcClient;
LOGBRUSH brush;
BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
......@@ -870,10 +873,8 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style
if (brush.lbStyle == BS_SOLID)
SetBkColor(hdc, brush.lbColor);
}
GetClientRect(hwnd, &rcClient);
if (style & SS_CENTERIMAGE)
{
FillRect( hdc, &rcClient, hbrush );
rcClient.left = (rcClient.right - rcClient.left)/2 - bm.bmWidth/2;
rcClient.top = (rcClient.bottom - rcClient.top)/2 - bm.bmHeight/2;
rcClient.right = rcClient.left + bm.bmWidth;
......
......@@ -118,7 +118,6 @@ static void test_updates(int style)
{
HDC hdc = GetDC(hStatic);
COLORREF colour = GetPixel(hdc, 10, 10);
todo_wine
ok(colour == 0, "Unexpected pixel color.\n");
ReleaseDC(hStatic, hdc);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment