Click to See Complete Forum and Search --> : Flicker-free Drawing?


Ryan Schneider
October 26th, 1998, 01:11 PM
Quick question:


I've got a list box that I want to fill with a bunch of data.


How do I tell the listbox not to repaint itself until all the data has been added?


MFC equivalent:

LockWindowUpdate();

//add some stuff

UnlockWindowUpdate();


Toolbook (ugh..) Equivalent:


SysLockScreen = true

//do something

SysLockScreen = false


In the MSDN libary, they just say "hide the control first", but then there's just empty space there, which looks silly.


As a side note, the flicker only shows up in Win95, not winNT...


TIA,

Ryan

Ryan Schneider
October 27th, 1998, 09:01 AM
Well, I tried using SendMessage(WM_SETREDRAW), but this isn't doing what I need.


The problem occurs in a multithreaded app.

Each thread has a progress bar associated w/ it. As the thread progresses, so does the progress bar(!)

However, in win95, the progressbar flickers after each refresh.

In WinNT, it doesn't.


I'm not using a "real" mscomctrl progress bar, but rather Steve Butler's enchanced progress bar (w/ text overlay). Found at:


http://www.pncl.co.uk/~sbutler/activex.htm (also under OCX Controls on codeguru)


Any ideas?

Justin Decker
October 29th, 1998, 04:51 PM
Your MFC code for the API LockWindow works the same way in VB... But it would be kinda useless to use it on a progress bar. I'm pretty sure that there really isn't anything you can do about it, its the controls fault. I think there is a flicker free CCRP progress bar that isn't supposed to flicker.