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

Thread: CView Flickers

  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    119

    CView Flickers


    I am trying to figure out why one of my SDI splitter view is flickering. I have a view that uses StretchDIBBits to display a series of BMPs in a view, and this seems to cause the flicker in another splitter form view. Can anyone tell me why? Nothing else flickers except the view with the MFC control in it.


  2. #2
    Join Date
    Mar 2001
    Location
    Colorado
    Posts
    241

    Re: CView Flickers

    Are you doing an UpdateWindow() or Invalidate()at all in the view that is flickering?

    Wade

  3. #3
    Join Date
    Jun 2001
    Location
    California
    Posts
    119

    Re: CView Flickers

    No, but I do call UpdateAllViews() from the Document class. However, I didn't override OnUpdate(), or Invalidate(), it is just a blank dialog/form view.


  4. #4
    Join Date
    Mar 2001
    Location
    Colorado
    Posts
    241

    Re: CView Flickers

    Ok that leads me to my next question. Did you override OnSyncToDoc() and add the view to the doc? I'm just thinking that if you did, in other words, if the doc is trying to update that view and you don't handle OnUpdate, I wonder if the default behavior is to just Invalidate. It might be worth a try, add in an OnUpdate handler and just break on that particular hint and see if that fixes it. Other than that, I have no idea what might be causing the flicker.

    Good luck, and please let me know if you find the answer just in case I ever run into that problem.

    Wade

  5. #5
    Join Date
    Jun 2001
    Location
    California
    Posts
    119

    Re: CView Flickers

    Genius!


  6. #6
    Join Date
    Jun 2001
    Location
    California
    Posts
    119

    Re: CView Flickers

    All I did was add OnUpdate() virtual override.


  7. #7
    Join Date
    Mar 2001
    Location
    Colorado
    Posts
    241

    Re: CView Flickers

    Excellent, I'm glad that worked for you.

    Happy coding,

    Wade

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