Click to See Complete Forum and Search --> : What is the difference between GetDC()->GetClipBox(&foo) and CWnd::GetClientRect(&foo)


James Dunning
April 30th, 1999, 05:41 AM
If CRect foo, What is the difference between GetDC()->GetClipBox(&foo) and CWnd::GetClientRect(&foo), because the resultant foo appear to be the same for both functions....

I think GetDC()->GetClipBox(&foo) returns the view area of the device contect, if it does, how is it posisble to move the clipbox to another area of the device contect?

could someone plz clear up my confusion over the 2 functions..

thanks in advance

Jason Teagle
April 30th, 1999, 06:57 AM
GetClientRect() retrieves the whole of the client area, whether it will be drawn in or not.

GetClipBox() retrieves that portion of the client area which can actually be drawn in - anything drawn out side will not show (= will be clipped).

Therefore, GetClipBox() returns a rectangle which should be less than or equal to that returned by GetClientRect(), depending on how much of the client needs painting (or has been declared as the painting viewport).