Commit 4d7041a6 authored by Alexandre Julliard's avatar Alexandre Julliard

Explicitly check for CS_PARENTDC in WM_ERASEBKGND handling.

parent 96c514bd
......@@ -461,10 +461,13 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
HBRUSH hbr = GetClassLongW( wndPtr->hwndSelf, GCL_HBRBACKGROUND );
if (!hbr) return 0;
/* GetClientRect used to be GetClipBox, but it is not what
* Windows does, and it breaks badly with CS_PARENTDC */
GetClientRect( wndPtr->hwndSelf, &rect );
DPtoLP( hdc, (LPPOINT)&rect, 2 );
if (GetClassLongW( wndPtr->hwndSelf, GCL_STYLE ) & CS_PARENTDC)
{
/* can't use GetClipBox with a parent DC or we fill the whole parent */
GetClientRect( wndPtr->hwndSelf, &rect );
DPtoLP( hdc, (LPPOINT)&rect, 2 );
}
else GetClipBox( hdc, &rect );
FillRect( hdc, &rect, hbr );
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