From cd80c487f52adb785915b71223225cd90c4e890e Mon Sep 17 00:00:00 2001 From: Hannu Valtonen Date: Tue, 24 May 2005 10:10:54 +0000 Subject: [PATCH] Use correct background color for the whole richedit control. --- dlls/riched20/paint.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 7d5e387d20d..e8ffd5a0be9 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -76,23 +76,19 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, RECT *rcUpda if (rcUpdate->bottom < ye) ye = rcUpdate->bottom; } - - rc.left = xs; /* FIXME remove if it's not necessary anymore */ - rc.top = c.pt.y; - rc.right = xe; - rc.bottom = c.pt.y+1; - FillRect(hDC, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH)); - if (ys == c.pt.y) /* don't overwrite the top bar */ - ys++; if (ye>ys) { + HBRUSH hbr; + hbr = CreateSolidBrush(ME_GetBackColor(c.editor)); rc.left = xs; rc.top = ys; rc.right = xe; rc.bottom = ye; - /* this is not supposed to be gray, I know, but lets keep it gray for now for debugging purposes */ - FillRect(hDC, &rc, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); + FillRect(hDC, &rc, hbr); + DeleteObject(hbr); } + if (ys == c.pt.y) /* don't overwrite the top bar */ + ys++; } editor->nLastTotalLength = editor->nTotalLength; ME_DestroyContext(&c);