Solved

Resize/scroll flicker in ownerdraw CListCtrl

Posted on 1997-08-07
3
1,454 Views
Last Modified: 2013-11-19
I have an ownerdrawn list control which resizes and scrolls
just fine, but is there a way to reduce the noticeable flicker?
0
Comment
Question by:peterg062497
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1303301
Have you tried looking at the SetRedraw method in CWnd? You can temporarily turn off redrawing, until the size if fully known and then redraw everything.
0
 

Author Comment

by:peterg062497
ID: 1303302
SetRedraw makes the problem worse, as the listctrl blanks completely
from the first of many OnEraseBkgnd messages and won't repaint until
it's allowed from the SetRedraw(TRUE).
It appears that this is a common problem - I've seen it in the NT 4.0 file manager and explorer.  As a view is resized, erase messages keep coming in to stop the window from reflecting what is behind it, followed by OnPaint messages, which causes the flicker.  Trying to override the erase background message to erase only the rectangle(s) that have changed could get really hairy, unless someone else has done it and is willing to part with the code.
If I have mis-analyzed the problem please let me know.
Thanks
Pete Glick
0
 

Author Comment

by:peterg062497
ID: 1303303
I researched the problem myself, and found that the vertical and horizontal
redraw bits (CS_VREDRAW, CS_HREDRAW) needed to be removed from the View and Frame style masks.  This cured almost all the flicker.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now