riched20: Explicitly select the background brush.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
393b18ab7a
commit
a19cecacda
|
@ -32,6 +32,9 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
|
||||||
ME_Cell *cell;
|
ME_Cell *cell;
|
||||||
int ys, ye;
|
int ys, ye;
|
||||||
HRGN oldRgn;
|
HRGN oldRgn;
|
||||||
|
HBRUSH brush = CreateSolidBrush( ITextHost_TxGetSysColor( editor->texthost, COLOR_WINDOW ) );
|
||||||
|
|
||||||
|
ME_InitContext( &c, editor, hDC );
|
||||||
|
|
||||||
oldRgn = CreateRectRgn(0, 0, 0, 0);
|
oldRgn = CreateRectRgn(0, 0, 0, 0);
|
||||||
if (!GetClipRgn(hDC, oldRgn))
|
if (!GetClipRgn(hDC, oldRgn))
|
||||||
|
@ -42,7 +45,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
|
||||||
IntersectClipRect(hDC, rcUpdate->left, rcUpdate->top,
|
IntersectClipRect(hDC, rcUpdate->left, rcUpdate->top,
|
||||||
rcUpdate->right, rcUpdate->bottom);
|
rcUpdate->right, rcUpdate->bottom);
|
||||||
|
|
||||||
ME_InitContext(&c, editor, hDC);
|
brush = SelectObject( hDC, brush );
|
||||||
SetBkMode(hDC, TRANSPARENT);
|
SetBkMode(hDC, TRANSPARENT);
|
||||||
|
|
||||||
para = editor_first_para( editor );
|
para = editor_first_para( editor );
|
||||||
|
@ -89,6 +92,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
|
||||||
editor->nLastTotalLength = editor->nTotalLength;
|
editor->nLastTotalLength = editor->nTotalLength;
|
||||||
editor->nLastTotalWidth = editor->nTotalWidth;
|
editor->nLastTotalWidth = editor->nTotalWidth;
|
||||||
|
|
||||||
|
DeleteObject( SelectObject( hDC, brush ) );
|
||||||
SelectClipRgn(hDC, oldRgn);
|
SelectClipRgn(hDC, oldRgn);
|
||||||
if (oldRgn)
|
if (oldRgn)
|
||||||
DeleteObject(oldRgn);
|
DeleteObject(oldRgn);
|
||||||
|
|
Loading…
Reference in New Issue