Prepare background while drawing radio buttons and checkboxes
Dmitry Timoshkov
dmitry at sloboda.ru
Thu Feb 22 09:02:39 CST 2001
Hello.
Since WM_ERASEBKGND does nothing in the button window proc,
some quirks occur while drawing radio buttons and checkboxes.
This patch fixes that.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Prepare background while drawing radio buttons and checkboxes.
diff -u cvs/wine/controls/button.c wine/controls/button.c
--- cvs/wine/controls/button.c Tue Jan 16 21:39:30 2001
+++ wine/controls/button.c Thu Feb 22 22:51:30 2001
@@ -832,6 +832,10 @@
/* Draw the check-box bitmap */
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
{
+ /* Since WM_ERASEBKGND does nothing, first prepare background */
+ if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
+ else FillRect( hDC, &client, hBrush );
+
if( TWEAK_WineLook == WIN31_LOOK )
{
HDC hMemDC = CreateCompatibleDC( hDC );
@@ -840,9 +844,6 @@
/* Check in case the client area is smaller than the checkbox bitmap */
if (delta < 0) delta = 0;
-
- if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
- else FillRect( hDC, &client, hBrush );
if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
More information about the wine-patches
mailing list