Solved

Resize/scroll flicker in ownerdraw CListCtrl

Posted on 1997-08-07
3
1,466 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 125
iSeries FTP Exit Program 8 135
NotAlone Challenge 20 83
Detect file exist or not 3 154
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

813 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

12 Experts available now in Live!

Get 1:1 Help Now