CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 1998
    Posts
    4

    Flicker-free Drawing?



    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




  2. #2
    Join Date
    Dec 1998
    Posts
    4

    Re: Flicker-free Drawing? (Additional Info)



    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?




  3. #3
    Join Date
    Dec 1998
    Posts
    28

    Re: Flicker-free Drawing? (Additional Info)



    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.

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