Click to See Complete Forum and Search --> : Repaint only part of the client area
MasterDucky
September 23rd, 2008, 12:16 AM
Is there a way to get only a part of the client area with GDI?
Or do i need DirectX for this?
I mean if i wanted to repaint only a little rectangle in the client area and
leave the rest as it is.
olivthill
September 23rd, 2008, 04:17 AM
It is possible, e.g.
- If you draw a rectangle, then your program can test the coordinates before issuing the Rectangle() API with coordinates inside your area.
- It is the same for string of characters written with DrawText() or with TextOut().
- If you have a picture, you can use BitBlt() only for the area you want to repaint.
- Or you can use "regions". See http://msdn.microsoft.com/en-us/library/ms536684(VS.85).aspx
MasterDucky
September 23rd, 2008, 11:58 AM
Thank you Olivthill! (member.php?u=171621)
I'll give it a try.
gstercken
September 23rd, 2008, 02:25 PM
Is there a way to get only a part of the client area with GDI?
I mean if i wanted to repaint only a little rectangle in the client area and
leave the rest as it is.Sure - that's exactly what InvalidateRect() and InvalidateRgn() are for.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.