Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Flickering problem in list control

Flickering problem in list control

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelptutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MKC002
    wrote on last edited by
    #1

    If i insert some items say 500 or more than it in list control then flickering problem occur. I have tried to create secondary thread and insert items from list control from thread but the flickering problem still exist. I hface same problem in tree control also. Please suggest how to solve it.

    C L R 3 Replies Last reply
    0
    • M MKC002

      If i insert some items say 500 or more than it in list control then flickering problem occur. I have tried to create secondary thread and insert items from list control from thread but the flickering problem still exist. I hface same problem in tree control also. Please suggest how to solve it.

      C Offline
      C Offline
      Chris Meech
      wrote on last edited by
      #2

      Before you update the list control with the 500 items, make a call to

      SetRedraw(FALSE);

      Once you are completed adding the 500 items, you then call

      SetRedraw(TRUE);

      :)

      Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

      1 Reply Last reply
      0
      • M MKC002

        If i insert some items say 500 or more than it in list control then flickering problem occur. I have tried to create secondary thread and insert items from list control from thread but the flickering problem still exist. I hface same problem in tree control also. Please suggest how to solve it.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        With this number of items you may want to consider using a virtual (owner drawn) listview.

        Unrequited desire is character building.

        1 Reply Last reply
        0
        • M MKC002

          If i insert some items say 500 or more than it in list control then flickering problem occur. I have tried to create secondary thread and insert items from list control from thread but the flickering problem still exist. I hface same problem in tree control also. Please suggest how to solve it.

          R Offline
          R Offline
          Rolf Kristensen
          wrote on last edited by
          #4

          LVS_EX_DOUBLEBUFFER[^]

          m_ListCtrl.SetExtendedStyle(m_ListCtrl.GetExtendedStyle() | LVS_EX_DOUBLEBUFFER);

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups