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. listView

listView

Scheduled Pinned Locked Moved C / C++ / MFC
algorithmshelptutorialannouncement
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.
  • N Offline
    N Offline
    nitin3
    wrote on last edited by
    #1

    hi all,, i am developing an application that list running windows in a list view as in taskmanager, the items in the listview can be sorted on clicking a column. my problem is how to update the values in listview after sorting the items.

    Thanks & Regards

    M stefanmihaimogaS 2 Replies Last reply
    0
    • N nitin3

      hi all,, i am developing an application that list running windows in a list view as in taskmanager, the items in the listview can be sorted on clicking a column. my problem is how to update the values in listview after sorting the items.

      Thanks & Regards

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      nitin3 wrote:

      how to update the values in listview after sorting the items

      How are you sorting the items? If you use ListView_SortItems (LVM_SORTITEMS) you shouldn't need to do anything. Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      N 1 Reply Last reply
      0
      • N nitin3

        hi all,, i am developing an application that list running windows in a list view as in taskmanager, the items in the listview can be sorted on clicking a column. my problem is how to update the values in listview after sorting the items.

        Thanks & Regards

        stefanmihaimogaS Offline
        stefanmihaimogaS Offline
        stefanmihaimoga
        wrote on last edited by
        #3

        Hello, I think that How to sort a ListView control by a column in Visual C++ .NET[^] article could/should help you. Best regards, Mihai Moga

        1 Reply Last reply
        0
        • M Mark Salsbery

          nitin3 wrote:

          how to update the values in listview after sorting the items

          How are you sorting the items? If you use ListView_SortItems (LVM_SORTITEMS) you shouldn't need to do anything. Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          N Offline
          N Offline
          nitin3
          wrote on last edited by
          #4

          i used ListView_SortItemsEx Stpes:- state of lv before sorting col1 col2 col3 .. coln --------------------------------------------------------------- Notepad Running Calculator Running 1) the user click on first column then it will become col1 col2 col3 .. coln --------------------------------------------------------------- Calculator Running Notepad Running 2) after a second the list view get refreshed by calling EnumWindows. the code to add item to the listview is written in lpWndEnumProc function. if i got the handle to the window calculator at first , i dont know what will be the index of calculater this time, if this is not a sorted list i can insert it at index 0.

          Thanks & Regards

          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