[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: Button control has incorrect clipping regions
From: "Dave Hawkes" <daveh-wine () cadlink ! com>
Date: 2000-06-27 12:49:07
[Download RAW message or body]
All standard window controls should have CS_PARENTDC, but should still clip to the \
control window (except menus). The button did not clip.
Dave Hawkes
Cadlink Technology
["button.diff" (application/octet-stream)]
Index: ./controls/button.c
===================================================================
RCS file: /home/wine/wine/controls/button.c,v
retrieving revision 1.39
diff -u -w -r1.39 button.c
--- ./controls/button.c 2000/06/11 20:08:46 1.39
+++ ./controls/button.c 2000/06/27 12:13:07
@@ -921,6 +921,8 @@
{
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
DRAWITEMSTRUCT dis;
+ HRGN clipRegion;
+ RECT clipRect;
dis.CtlType = ODT_BUTTON;
dis.CtlID = wndPtr->wIDmenu;
@@ -934,9 +936,21 @@
dis.itemData = 0;
GetClientRect( wndPtr->hwndSelf, &dis.rcItem );
+ clipRegion = CreateRectRgnIndirect(&dis.rcItem);
+ if (GetClipRgn(hDC, clipRegion) != 1)
+ {
+ DeleteObject(clipRegion);
+ clipRegion=(HRGN)NULL;
+ }
+ clipRect = dis.rcItem;
+ DPtoLP(hDC, (LPPOINT) &clipRect, 2);
+ IntersectClipRect(hDC, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
+
SetBkColor( hDC, GetSysColor( COLOR_BTNFACE ) );
SendMessageA( GetParent(wndPtr->hwndSelf), WM_DRAWITEM,
wndPtr->wIDmenu, (LPARAM)&dis );
+
+ SelectClipRgn(hDC, clipRegion);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic