diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 1117ec43e91..45b93bdc8b5 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -487,20 +487,24 @@ void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) { RECT r = *lprc; UINT border = BDR_SUNKENOUTER; + COLORREF oldbkcolor; if (style & SBT_POPOUT) border = BDR_RAISEDOUTER; else if (style & SBT_NOBORDERS) border = 0; - DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST); + oldbkcolor = SetBkColor (hdc, comctl32_color.clrBtnFace); + DrawEdge (hdc, &r, border, BF_MIDDLE|BF_RECT|BF_ADJUST); /* now draw text */ if (text) { int oldbkmode = SetBkMode (hdc, TRANSPARENT); + COLORREF oldtextcolor; UINT align = DT_LEFT; int strCnt = 0; + oldtextcolor = SetTextColor (hdc, comctl32_color.clrBtnText); if (style & SBT_RTLREADING) FIXME("Unsupported RTL style!\n"); r.left += 3; @@ -520,8 +524,11 @@ void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) } while(*text++); if (strCnt) DrawTextW (hdc, text - strCnt, -1, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX); - SetBkMode(hdc, oldbkmode); + SetBkMode (hdc, oldbkmode); + SetTextColor (hdc, oldtextcolor); } + + SetBkColor (hdc, oldbkcolor); }