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. multiple selection in a list box

multiple selection in a list box

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresquestion
13 Posts 6 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.
  • P prithaa

    Hello, I have a list box using CListBox class in which I want to select multiple choices in the list box. But how do I get all the strings selected in an array. The documentation of CListBox tehre is no function to get multiple strings. The GetSelItems() function gives multiple ints then What should I do. Thanks Prithaa

    T Offline
    T Offline
    tanvon malik
    wrote on last edited by
    #3

    Hi you youselve have to do it in a for loop GetSelItems() GetText()

    tanvon malik http://www.tanvon.com http://tanvon.wordpress.com http://groups.yahoo.com/group/tanvon http://www.codeproject.com/script/articles/list_articles.asp?userid=1638055

    1 Reply Last reply
    0
    • D David Crow

      prithaa wrote:

      The GetSelItems() function gives multiple ints then What should I do.

      Those are the indexes of the selected items.


      "A good athlete is the result of a good and worthy opponent." - David Crow

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      P Offline
      P Offline
      prithaa
      wrote on last edited by
      #4

      Hello, Thanks,I overlooked the docs. Prithaa

      J 1 Reply Last reply
      0
      • P prithaa

        Hello, Thanks,I overlooked the docs. Prithaa

        J Offline
        J Offline
        James R Twine
        wrote on last edited by
        #5

        prithaa wrote:

        Thanks,I overlooked the docs.

        Now THAT is something that is just begging to be in a signature...!    Peace!

        -=- James
        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        See DeleteFXPFiles

        M 1 Reply Last reply
        0
        • J James R Twine

          prithaa wrote:

          Thanks,I overlooked the docs.

          Now THAT is something that is just begging to be in a signature...!    Peace!

          -=- James
          Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
          Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
          See DeleteFXPFiles

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

          Mornin' James :)

          Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

          J E 2 Replies Last reply
          0
          • M Mark Salsbery

            Mornin' James :)

            Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

            J Offline
            J Offline
            James R Twine
            wrote on last edited by
            #7

            :laugh:   :laugh:   :laugh:    Peace!

            -=- James
            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            See DeleteFXPFiles

            1 Reply Last reply
            0
            • M Mark Salsbery

              Mornin' James :)

              Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #8

              You just stole a document from James! Naa too bad.:-D


              Best wishes to Rexx[^]

              M 1 Reply Last reply
              0
              • E Eytukan

                You just stole a document from James! Naa too bad.:-D


                Best wishes to Rexx[^]

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

                I haven't heard from his attorneys yet :)

                Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

                E 1 Reply Last reply
                0
                • M Mark Salsbery

                  I haven't heard from his attorneys yet :)

                  Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

                  E Offline
                  E Offline
                  Eytukan
                  wrote on last edited by
                  #10

                  Didn't you just hear from me?:~ :-D


                  Best wishes to Rexx[^]

                  M 1 Reply Last reply
                  0
                  • E Eytukan

                    Didn't you just hear from me?:~ :-D


                    Best wishes to Rexx[^]

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

                    Fixed.

                    Mark Salsbery Microsoft MVP - Visual C++ "You just stole a document from James!"

                    J 1 Reply Last reply
                    0
                    • M Mark Salsbery

                      Fixed.

                      Mark Salsbery Microsoft MVP - Visual C++ "You just stole a document from James!"

                      J Offline
                      J Offline
                      James R Twine
                      wrote on last edited by
                      #12

                      Even funnier! :laugh:    Peace!

                      -=- James
                      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                      Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                      See DeleteFXPFiles

                      E 1 Reply Last reply
                      0
                      • J James R Twine

                        Even funnier! :laugh:    Peace!

                        -=- James
                        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                        Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                        See DeleteFXPFiles

                        E Offline
                        E Offline
                        Eytukan
                        wrote on last edited by
                        #13

                        Hey what are you looking at? I just tricked him with my doc. He's just taken his hands up from your doc! Just grab it back James, fast fast.:laugh: btw, Marc is this we call a "sig-Virus",that gets itself attached to the sigs automatically?. :-D (Very funny indeed!)


                        Best wishes to Rexx[^]

                        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