Commit 526ffdc3 authored by Yuxi Zhang's avatar Yuxi Zhang Committed by Alexandre Julliard

Make defwndproc erase the correct location.

parent 623c0d6f
......@@ -301,18 +301,28 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
case WM_ERASEBKGND:
case WM_ICONERASEBKGND:
{
RECT16 rect;
if (!wndPtr->class->hbrBackground) return 0;
/* Since WM_ERASEBKGND may receive either a window dc or a */
/* client dc, the area to be erased has to be retrieved from */
/* the device context. */
GetClipBox16( (HDC16)wParam, &rect );
if (wndPtr->class->hbrBackground <= (HBRUSH16)(COLOR_MAX+1))
{
HBRUSH hbrush = CreateSolidBrush(
GetSysColor(((DWORD)wndPtr->class->hbrBackground)-1));
FillWindow16( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC16)wParam, hbrush);
PaintRect16( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC16)wParam, hbrush, &rect);
DeleteObject( hbrush );
}
else
{
PaintRect16( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC16)wParam, wndPtr->class->hbrBackground, &rect );
}
else FillWindow16( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC16)wParam, wndPtr->class->hbrBackground );
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment