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. MFC VC++ ListCtrl

MFC VC++ ListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
c++
6 Posts 5 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
    Member_14575556
    wrote on last edited by
    #1

    I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.

    CPalliniC V D 3 Replies Last reply
    0
    • M Member_14575556

      I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      We have an oldie-goldie article on Dialogs Communication[^].

      In testa che avete, signor di Ceprano?

      M 1 Reply Last reply
      0
      • CPalliniC CPallini

        We have an oldie-goldie article on Dialogs Communication[^].

        M Offline
        M Offline
        Member_14575556
        wrote on last edited by
        #3

        Thank you for the quick reply. :) I know how to navigate from dialog to dialog ,this is where I am getting confused - "How do I select a row in the List control?" Thanks again :)

        L 1 Reply Last reply
        0
        • M Member_14575556

          I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.

          V Offline
          V Offline
          Victor Nijegorodov
          wrote on last edited by
          #4

          You should handle the [LVN_ITEMCHANGED notification code - Windows applications | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/controls/lvn-itemchanged) [CListCtrl selection changing handling](http://forums.codeguru.com/showthread.php?489227-CListCtrl-selection-changing-handling) There is a lot of samples and tutorials also for beginners. for instance: [VC++ MFC Tutorial: CListCtrl, InsertItem, Using List Control, SetImageList, Article with source code.](http://www.ucancode.net/VC\_Library\_Control\_Tool/VC\_MFC\_Totorial\_CListCtrl\_InsertItem\_SetImageList\_Article.htm) [CListCtrl For Beginners](https://simplesamples.info/Beginners/CListCtrl.aspx)

          1 Reply Last reply
          0
          • M Member_14575556

            Thank you for the quick reply. :) I know how to navigate from dialog to dialog ,this is where I am getting confused - "How do I select a row in the List control?" Thanks again :)

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

            When the user clicks a row you should receive a notification message: see Processing Notification Messages in List Controls | Microsoft Docs[^].

            1 Reply Last reply
            0
            • M Member_14575556

              I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Have you looked at the NM_CLICK notification code?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              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