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. Freezing a list control

Freezing a list control

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionannouncement
4 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.
  • V Offline
    V Offline
    v_krishnan
    wrote on last edited by
    #1

    Hi, I have an application which contains a listcontrol in report view. When the user is viewing the data in the list, more data can get inserted into the list in the background. This would cause the list control to scroll. This is nuisance from the user's point of view, because he cannot see what he wants as the list gets scrolled frequently. Now, I want to provide an option through which the user can freeze the view that he is looking at. The list control should then just update the scrollbars (indicating that more data is being added) only. Can someone please help me in acheiving this? Krishnan

    J O 2 Replies Last reply
    0
    • V v_krishnan

      Hi, I have an application which contains a listcontrol in report view. When the user is viewing the data in the list, more data can get inserted into the list in the background. This would cause the list control to scroll. This is nuisance from the user's point of view, because he cannot see what he wants as the list gets scrolled frequently. Now, I want to provide an option through which the user can freeze the view that he is looking at. The list control should then just update the scrollbars (indicating that more data is being added) only. Can someone please help me in acheiving this? Krishnan

      J Offline
      J Offline
      James Pullicino
      wrote on last edited by
      #2

      Try experimenting with SetRedraw() (2b || !2b)

      1 Reply Last reply
      0
      • V v_krishnan

        Hi, I have an application which contains a listcontrol in report view. When the user is viewing the data in the list, more data can get inserted into the list in the background. This would cause the list control to scroll. This is nuisance from the user's point of view, because he cannot see what he wants as the list gets scrolled frequently. Now, I want to provide an option through which the user can freeze the view that he is looking at. The list control should then just update the scrollbars (indicating that more data is being added) only. Can someone please help me in acheiving this? Krishnan

        O Offline
        O Offline
        ORi x
        wrote on last edited by
        #3

        use InsertItem(&Item) where item is a LVITEM structure and has stateMask = 0 this does exactly what you want, it inserts the new item without focusing on it. ORi.

        V 1 Reply Last reply
        0
        • O ORi x

          use InsertItem(&Item) where item is a LVITEM structure and has stateMask = 0 this does exactly what you want, it inserts the new item without focusing on it. ORi.

          V Offline
          V Offline
          v_krishnan
          wrote on last edited by
          #4

          Hi, I tried your solution. But, it does not work when the items are being added in the beginning.

          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