Commit 129862f3 authored by Mark Harmstone's avatar Mark Harmstone Committed by Alexandre Julliard

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

parent 6a8da85c
......@@ -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;
......
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