diff --git a/dll/win32/comctl32/comctl32.h b/dll/win32/comctl32/comctl32.h index 6f9c951b9e6..ee40642212c 100644 --- a/dll/win32/comctl32/comctl32.h +++ b/dll/win32/comctl32/comctl32.h @@ -191,6 +191,7 @@ extern COMCTL32_SysColor comctl32_color DECLSPEC_HIDDEN; /* Internal function */ HWND COMCTL32_CreateToolTip (HWND) DECLSPEC_HIDDEN; +void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background) DECLSPEC_HIDDEN; VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN; void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal) DECLSPEC_HIDDEN; void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground) DECLSPEC_HIDDEN; diff --git a/dll/win32/comctl32/commctrl.c b/dll/win32/comctl32/commctrl.c index 912c85b5137..24c551a80a3 100644 --- a/dll/win32/comctl32/commctrl.c +++ b/dll/win32/comctl32/commctrl.c @@ -654,7 +654,6 @@ GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, const INT *lpInfo) } while (*lpRun); } - /*********************************************************************** * DrawStatusTextW [COMCTL32.@] * @@ -674,23 +673,31 @@ GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, const INT *lpInfo) * (will be written ...) */ -void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) +void WINAPI DrawStatusTextW(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) +{ + COMCTL32_DrawStatusText(hdc, lprc, text, style, TRUE); +} + + +void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background) { RECT r = *lprc; - UINT border = BDR_SUNKENOUTER; + UINT border; COLORREF oldbkcolor; - if (style & SBT_POPOUT) - border = BDR_RAISEDOUTER; - else if (style & SBT_NOBORDERS) - border = 0; - - oldbkcolor = SetBkColor (hdc, comctl32_color.clrBtnFace); -#ifdef __REACTOS__ // HACK for CORE-19854. - DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST); -#else - DrawEdge (hdc, &r, border, BF_MIDDLE|BF_RECT|BF_ADJUST); -#endif + if (draw_background) + { + if (style & SBT_POPOUT) + border = BDR_RAISEDOUTER; + else if (style & SBT_NOBORDERS) + border = 0; + else + border = BDR_SUNKENOUTER; + + oldbkcolor = SetBkColor (hdc, comctl32_color.clrBtnFace); + DrawEdge (hdc, &r, border, BF_MIDDLE|BF_RECT|BF_ADJUST); + SetBkColor (hdc, oldbkcolor); + } /* now draw text */ if (text) { @@ -722,8 +729,6 @@ void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) SetBkMode (hdc, oldbkmode); SetTextColor (hdc, oldtextcolor); } - - SetBkColor (hdc, oldbkcolor); }