Adrian Martin wrote:
> I don't think Parent.Invalidate( rect , true ) will
translate the rect
> and call a Child.Invalidate( rect , true ), I think it
just calls
> Child.Invalidate(true) for any control within the
rect, hence the clip
> is set to the client area of the control.
you inspired me to see what it actually does do.
The code [1] (via reflector) gets the rect and passes it to
the
User32.dll!RedrawWindow method, the help [2] for which does
not indicate
what happens to the rectangle.
I will try to avoid using the invalidate children call and
see where it
gets me.
Cheers,
adam
[1]
public void Invalidate(Rectangle rc, bool
invalidateChildren)
{
/* ... snip ...*/
NativeMethods.RECT rect1 =
NativeMethods.RECT.FromXYWH(rc.X, rc.Y, rc.Width,
rc.Height);
SafeNativeMethods.RedrawWindow(
new HandleRef(this.window, this.Handle),
ref rect1,
NativeMethods.NullHandleRef,
RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN);
/* ... snip ...*/
NotifyInvalidate(rc);
}
[2]
http://msdn.microsoft.com/
library/default.asp?url=/library/en-us/gdi/pantdraw_81pz.asp
|