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

CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
13 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.
  • B Bravoone_2006

    Ok,i have try this: for(int k=0; kBravoone

    R Offline
    R Offline
    Ram Murali
    wrote on last edited by
    #4

    Your coding seems ok. nothing problem with the code. why dont you debug the code and check the value of s1, s2 and sT.

    Regards, Ram

    B 1 Reply Last reply
    0
    • R Ram Murali

      Your coding seems ok. nothing problem with the code. why dont you debug the code and check the value of s1, s2 and sT.

      Regards, Ram

      B Offline
      B Offline
      Bravoone_2006
      wrote on last edited by
      #5

      is ok i now but i need s1+s2 = sT but my code make this : MessageBox(s1); and then diplay MessageBox(s2); but i need s1 + s2 = sT MessageBox(sT); How?

      Bravoone

      R 1 Reply Last reply
      0
      • B Bravoone_2006

        How can i get the result ? I have a CListCtrl ,i have 2 columns column 0, column 1.All i whant is to select lets say 2 rows(GetCheck) , lets say in row 1-column 1 i have 10 in the second selected(GetCheck) row i have 20 , now i need the rezult 10+20=30 , 30 i need this in CEdit m_result.SetWindowText(...); when i push the button i need to m_list.GetCheck(...); ...i think ! please help me !

        Bravoone

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #6

        Can you try using CListCtrl::GetFirstSelectedItemPosition(), CListCtrl::GetNextSelectedItem()?

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        B 2 Replies Last reply
        0
        • B Bravoone_2006

          is ok i now but i need s1+s2 = sT but my code make this : MessageBox(s1); and then diplay MessageBox(s2); but i need s1 + s2 = sT MessageBox(sT); How?

          Bravoone

          R Offline
          R Offline
          Ram Murali
          wrote on last edited by
          #7

          can you change the MessageBox(sT) statement outside the for loop and try.

          Regards, Ram

          1 Reply Last reply
          0
          • _ _AnsHUMAN_

            Can you try using CListCtrl::GetFirstSelectedItemPosition(), CListCtrl::GetNextSelectedItem()?

            Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

            B Offline
            B Offline
            Bravoone_2006
            wrote on last edited by
            #8

            m_list1.GetFirstSelectedItemPosition() : is not a member of 'CListCtrl'

            Bravoone

            J _ 2 Replies Last reply
            0
            • B Bravoone_2006

              m_list1.GetFirstSelectedItemPosition() : is not a member of 'CListCtrl'

              Bravoone

              J Offline
              J Offline
              jhwurmbach
              wrote on last edited by
              #9

              Bravoone_2006 wrote:

              m_list1.GetFirstSelectedItemPosition() : is not a member of 'CListCtrl'

              Then whatever you are programming is not Visual C++ / MFC. Oh, wait, it could still be VC++ 5.0 from the mid-nineties. Just kidding, but this function *really* should be there.


              Failure is not an option - it's built right in.

              1 Reply Last reply
              0
              • _ _AnsHUMAN_

                Can you try using CListCtrl::GetFirstSelectedItemPosition(), CListCtrl::GetNextSelectedItem()?

                Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

                B Offline
                B Offline
                Bravoone_2006
                wrote on last edited by
                #10

                ok,but how ?

                Bravoone

                _ 1 Reply Last reply
                0
                • B Bravoone_2006

                  m_list1.GetFirstSelectedItemPosition() : is not a member of 'CListCtrl'

                  Bravoone

                  _ Offline
                  _ Offline
                  _AnsHUMAN_
                  wrote on last edited by
                  #11

                  Here it is[^? And you didn't find it. :wtf:

                  Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

                  1 Reply Last reply
                  0
                  • B Bravoone_2006

                    ok,but how ?

                    Bravoone

                    _ Offline
                    _ Offline
                    _AnsHUMAN_
                    wrote on last edited by
                    #12

                    Use these two functions to get the selected items and the text related to them. Store them in some array(if the items selected are variable) and then add them up outside the loop by traversing the array.

                    Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

                    B 1 Reply Last reply
                    0
                    • _ _AnsHUMAN_

                      Use these two functions to get the selected items and the text related to them. Store them in some array(if the items selected are variable) and then add them up outside the loop by traversing the array.

                      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

                      B Offline
                      B Offline
                      Bravoone_2006
                      wrote on last edited by
                      #13

                      no,no you dont understand the user must not select the items he checks them!!!!!! only items checks i need them to get the value !

                      Bravoone

                      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