Solved

FlickerLess CListCtrl / DoubleBufferd

Posted on 2001-09-13
9
407 Views
Last Modified: 2013-11-20
I Need WORKING example of FlickerLess CListCtrl.
I'm using win 2k and so far non of the exampes I found worked at all (they all flickerd when refreshing / updating items)

regards
0
Comment
Question by:monster2
  • 4
  • 3
  • 2
9 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 100 total points
ID: 6481724
I have never seen this as a significant problem.  I think the trick is to not refresh/repopulate the entire list ... just the item(s) that need changing.  

If you show some typical code that flickers, I'll see if I can point out how to avoid the problem.

-- Dan
0
 

Author Comment

by:monster2
ID: 6482019
the problem is that I did'nt wonted to search trough items and to  change them.
I cleard whole list and then populate it from scratch.
I found some examples which should owerride oppaint and on erease handlers but they still flicker.
(I could use this examples to put background bitmap but that's not needed)
I wont to take dc from control make another for in memory drawing and then copy content the one in memory to real dc so that whole drawing is in memory.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6482305
use SetRedraw eg



    m_List.SetRedraw(FALSE); // turn drawing off regardless of list mode

//....
//Insert the items and or delete
//....

    m_List.SetRedraw(TRUE); // turn drawing back on and update the window
    m_List.Invalidate();
    m_List.UpdateWindow();

0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:monster2
ID: 6482508
IT'S FLICKER


m_List.SetRedraw(TRUE);    m_List.Invalidate();
   m_List.UpdateWindow();

the problem is that the list itself is not doublebufferd
when I call UpdateWindow since it's not doublebufferd it flicker.
Only solution is doublebufering
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6482534
then you will need to write you own - the above method will allow you to change the items and stop it trying to flicker but in the end you have to update the window to show the new contents
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6483268
>>I cleard whole list and then populate it from scratch

That is the problem.  

Patient:  Doctor! Doctor! It hurts when I do this!
Doctor:  Well, stop doing that!

Instead of clearing the list and repopulating it, simply replace the old top item with the new top item, and work your way down the list.  After replacing all the items if there are still more, insert them at the end.

Turn off sorting.

-- Dan
0
 

Author Comment

by:monster2
ID: 6483832
will try that I'm to tired right now
Thanks
0
 

Author Comment

by:monster2
ID: 6487544
well it's not what I asked but since I have decided to use such method (and to change my code :) ) I will accept it

Regards
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6488522
Thanks.
Better to use a simple, easy-to-understand, easy-to-maintain method than some convoluted double-buffer scheme anyway.

-- Dan
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeateFront java challenge 31 93
How to determine file rename from EventLog ? 2 49
lucky13 challenge 11 147
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 95
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 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