"Mikolaj Zalewski" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]