Use GetSysColorBrush(COLOR_WINDOW) when there is no brush for drawing

background in listbox.
This commit is contained in:
Dmitry Timoshkov 2001-02-26 22:31:55 +00:00 committed by Alexandre Julliard
parent f063d0432f
commit 52ece0efef
1 changed files with 8 additions and 2 deletions

View File

@ -2986,8 +2986,14 @@ static LRESULT WINAPI ListBoxWndProc_locked( WND* wnd, UINT msg,
RECT rect;
HBRUSH hbrush = SendMessageW( descr->owner, WM_CTLCOLORLISTBOX,
wParam, (LPARAM)wnd->hwndSelf );
GetClientRect(hwnd, &rect);
if (hbrush) FillRect( (HDC)wParam, &rect, hbrush );
TRACE("hbrush = %04x\n", hbrush);
if(!hbrush)
hbrush = GetSysColorBrush(COLOR_WINDOW);
if(hbrush)
{
GetClientRect(hwnd, &rect);
FillRect((HDC)wParam, &rect, hbrush);
}
}
return 1;
case WM_DROPFILES: