24 Aug
2007
24 Aug
'07
9:44 a.m.
"Mikolaj Zalewski" <mikolajz(a)google.com> writes:
+static void setup_clipping(HWND hwnd, HDC hdc) +{ + RECT rc; + HRGN hrgn; + + /* Native control has always a clipping region set when sending + * the WM_CTLCOLORSTATIC and an application depends on it + */ + GetClientRect(hwnd, &rc); + hrgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom); + if (GetClipRgn(hdc, hrgn) == 0) + SelectClipRgn(hdc, hrgn); + DeleteObject(hrgn); +}
You need to set the region in all cases, intersecting with the existing one if any. Also you need to restore the previous region after painting. -- Alexandre Julliard julliard(a)winehq.org