CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: RectVisible()

  1. #1
    Join Date
    Apr 1999
    Posts
    45

    RectVisible()

    When I run my MFC project, I use the scroll bars to reveal a part of the window that was previously hidden (obviously!). So in OnDraw when I call RectVisible() does this tell if a particular area of the window needs to be redrawn, i.e., if I scroll and a certain part of my window remains in view, but just moves a little with scroll bars, will RectVisible tell me that this area of the window does not need to be redrawn.
    I am having some problems with this, in that the whole window is being redrawn when I scroll. So either RectVisible tells my program to redraw the whole window (???) or I'm passing the wrong parameters to RectVisible.
    Can anybody explain what, exactly, RectVisible does?

    Thanks,
    Sean.


  2. #2
    Guest

    Re: RectVisible()

    RectVisible tell you when a rect is in a clipping region.
    But you have to declare the clipping region by InvalidateRect or InvalidateRgn in place of Invalidate when you are scrolling.

    Hope this helps


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