Use GetSysColorBrush(COLOR_WINDOW) when there is no brush for drawing background in listbox
Dmitry Timoshkov
dmitry at sloboda.ru
Sat Feb 24 08:16:10 CST 2001
Hello.
I was privately informed that my patch
"Prepare background while drawing radio buttons and checkboxes"
solved some painting problems with radio and check buttons
in ws_ftp.exe. Also I was asked to have a look at problems
with repainting listboxes in ws_ftp. Here is a fix for them.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Use GetSysColorBrush(COLOR_WINDOW) when there is no brush
for drawing background in listbox.
diff -u cvs/wine/controls/listbox.c wine/controls/listbox.c
--- cvs/wine/controls/listbox.c Tue Jan 16 21:39:30 2001
+++ wine/controls/listbox.c Sat Feb 24 22:00:43 2001
@@ -2986,8 +2986,14 @@
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:
More information about the wine-patches
mailing list