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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CListCtrl Bug when resizing - only happens when a newly inserted item causes scroll bar to appear

CListCtrl Bug when resizing - only happens when a newly inserted item causes scroll bar to appear

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 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.
  • W Offline
    W Offline
    workindeveloper
    wrote on last edited by
    #1

    I've got a class that's derived from both CWnd and CListCtrl. I'm using it to view events and so it's inserting new events every 15-30 seconds. When newly inserted items overflows the current view and causes the scroll bar to appear, I resize the window so that I can view all the items. This causes 1 to 2 blank lines to appear at the top of the CListCtrl. Any subsequent resizing up and down of the CListCtrl causes flickering and some of the column's values to be blank. I'm wondering if anyone has seen this problem before and/or how it can be fixed. Thanks heaps in advance.

    L G 2 Replies Last reply
    0
    • W workindeveloper

      I've got a class that's derived from both CWnd and CListCtrl. I'm using it to view events and so it's inserting new events every 15-30 seconds. When newly inserted items overflows the current view and causes the scroll bar to appear, I resize the window so that I can view all the items. This causes 1 to 2 blank lines to appear at the top of the CListCtrl. Any subsequent resizing up and down of the CListCtrl causes flickering and some of the column's values to be blank. I'm wondering if anyone has seen this problem before and/or how it can be fixed. Thanks heaps in advance.

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

      Perhaps a CListView control would be better as it handles all the scrolling and repainting automatically.

      It's time for a new signature.

      1 Reply Last reply
      0
      • W workindeveloper

        I've got a class that's derived from both CWnd and CListCtrl. I'm using it to view events and so it's inserting new events every 15-30 seconds. When newly inserted items overflows the current view and causes the scroll bar to appear, I resize the window so that I can view all the items. This causes 1 to 2 blank lines to appear at the top of the CListCtrl. Any subsequent resizing up and down of the CListCtrl causes flickering and some of the column's values to be blank. I'm wondering if anyone has seen this problem before and/or how it can be fixed. Thanks heaps in advance.

        G Offline
        G Offline
        GuyM
        wrote on last edited by
        #3

        I'm getting the same thing with a CListView derived class. If you solve this issue - please let me know... Thanks.

        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