comctl32: Themed buttons should not draw in System if font unset.

This commit is contained in:
Mark Harmstone 2015-02-17 23:39:16 +00:00 committed by Alexandre Julliard
parent 6a8da85c3b
commit 129862f369

View file

@ -181,8 +181,10 @@ static void CB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
hPrevFont = SelectObject(hDC, font);
created_font = TRUE;
}
} else
} else {
font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0);
hPrevFont = SelectObject(hDC, font);
}
GetClientRect(hwnd, &bgRect);
GetThemeBackgroundContentRect(theme, hDC, part, state, &bgRect, &textRect);
@ -243,8 +245,10 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
hPrevFont = SelectObject(hDC, font);
created_font = TRUE;
}
} else
} else {
font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0);
hPrevFont = SelectObject(hDC, font);
}
GetClientRect(hwnd, &bgRect);
textRect = bgRect;