CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    32

    What is the difference between GetDC()->GetClipBox(&foo) and CWnd::GetClientRect(&foo)

    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


  2. #2
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: What is the difference between GetDC()->GetClipBox(&foo) and CWnd::GetClientRect(&foo)

    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).

    --
    Jason Teagle
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured