[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

Partial painting of a control

Phil Jones

1/11/2005 2:49:00 AM

I'm a little confused over re-drawing part of a control.

From reading the ref docs, it appears that the Invalidate([rect]), that
takes a rectangle or region as a parameter should do this. However what I'm
finding is that when this method is called with a Rectangle that represents
a part of the control, the OnPaint event is fired as normal.

I've been looking at that ClipRegion property of the event-args, and in both
circumstances (a normal Invalidate invokation, or an Invalidate with a
rectangle) the ClipRegion is the same.

What should be done here? What is the way to go about partial rendering of
a control.
Any advice would be greatly appreciated!!!

Thanks...
===
Phil : NZ






2 Answers

uebercoder

1/11/2005 6:00:00 AM

0

You'll have to resort to calling the Win32 GDI

GetUpdateRect(HWND hWnd, LPRECT lpRect, BOOL bErase)

from USER32.DLL in order to retrieve the portion of the client area that has
been 'invalidated'.



"Phil Jones" <phil_newsgroup@hotmail.com> wrote in message
news:evWWcY49EHA.3120@TK2MSFTNGP12.phx.gbl...
> I'm a little confused over re-drawing part of a control.
>
> From reading the ref docs, it appears that the Invalidate([rect]), that
> takes a rectangle or region as a parameter should do this. However what
> I'm finding is that when this method is called with a Rectangle that
> represents a part of the control, the OnPaint event is fired as normal.
>
> I've been looking at that ClipRegion property of the event-args, and in
> both circumstances (a normal Invalidate invokation, or an Invalidate with
> a rectangle) the ClipRegion is the same.
>
> What should be done here? What is the way to go about partial rendering
> of a control.
> Any advice would be greatly appreciated!!!
>
> Thanks...
> ===
> Phil : NZ
>
>
>
>
>
>


Phil Jones

1/11/2005 9:52:00 PM

0

Thanks for that - seems strange that the framework doesn't make this
available (would make sense to be on the PaintEventArgs)

I wonder if there's any performance strategies to bear in mind when doing
this kind of thing.

Cheeers!
===
Phil