Update Region GDI

Started by
2 comments, last by Dave Hunt 18 years, 10 months ago
Hi I have a lot of objects that I draw onto my window, but when I move one object it moves very slowly, however when having less objects it moves faster. I presume this comes in with drawing and redrawing all the objects in WM_PAINT. I use InvalidateRect to update objects when they need redrawing. My question is, in WM_PAINT do I need to check if my objects are in the Update Region to be redrawn or does windows do that for you (which I am doubting now)?
Try, try and fucking try again.
Advertisement
Windows will automatically clip to the update region, but it will still process your attempts to write outside the update region. To limit what you attempt to draw to only those items in the update region, you can use RectVisible. Here is an example of redrawing just the update region.
Thought as much, nothing in coding is easy. Now to rewrite some code.

Thanks
Try, try and fucking try again.
Your welcome.

P.S. In re-reading my post, do you think I used the phrase "update region" enough? Maybe I should edit it and add a few more. :)

This topic is closed to new replies.

Advertisement