From 2862362259c1866071ef51fd7918f8fb04705e0a Mon Sep 17 00:00:00 2001 From: Francis Beaudet Date: Mon, 20 Sep 1999 18:28:08 +0000 Subject: [PATCH] Fixed display bug in the static control. --- controls/static.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controls/static.c b/controls/static.c index cbe89f7e6bb..b198fbe1148 100644 --- a/controls/static.c +++ b/controls/static.c @@ -379,7 +379,11 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc ) hBrush = SendMessageA( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC, hdc, wndPtr->hwndSelf ); if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH); - FillRect( hdc, &rc, hBrush ); + FillRect( hdc, &rc, hBrush ); + + if (!IsWindowEnabled(wndPtr->hwndSelf)) + SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT)); + if (wndPtr->text) DrawTextA( hdc, wndPtr->text, -1, &rc, wFormat ); }