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. Putting values in array

Putting values in array

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

    I have two methods.. OnCheck() which will check the record in listview control and another method Onchecklist() which will disabel or enable the buttons. Now my query is I want to check more than 1 record in the listview controls and store the indexes in an array. Then I want to pass each one to the OnCheckEPayList() method. Any pointers would be greatly helpful. Thanks, Sai

    C D M 3 Replies Last reply
    0
    • V vjasai

      I have two methods.. OnCheck() which will check the record in listview control and another method Onchecklist() which will disabel or enable the buttons. Now my query is I want to check more than 1 record in the listview controls and store the indexes in an array. Then I want to pass each one to the OnCheckEPayList() method. Any pointers would be greatly helpful. Thanks, Sai

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Your question isn't clear at all. What are you trying to do exactly ? Please, think that we do not see your code and so we have no idead at all what OnCheck Onchecklist are doing, which buttons you are talking about and what you store in the listview. Anyway, it seems you are looking for a container class. Did you have a look at std::vector (or std::list) ?


      Cédric Moonen Software developer
      Charting control [v1.2]

      D 1 Reply Last reply
      0
      • C Cedric Moonen

        Your question isn't clear at all. What are you trying to do exactly ? Please, think that we do not see your code and so we have no idead at all what OnCheck Onchecklist are doing, which buttons you are talking about and what you store in the listview. Anyway, it seems you are looking for a container class. Did you have a look at std::vector (or std::list) ?


        Cédric Moonen Software developer
        Charting control [v1.2]

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

        Cedric Moonen wrote:

        Please, think that we do not see your code...

        Come on, Cedric. When you took the oath to join the super-secret club, the welcome kit contained a pair of "spy" binoculars for just this purpose.

        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

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

        J 1 Reply Last reply
        0
        • V vjasai

          I have two methods.. OnCheck() which will check the record in listview control and another method Onchecklist() which will disabel or enable the buttons. Now my query is I want to check more than 1 record in the listview controls and store the indexes in an array. Then I want to pass each one to the OnCheckEPayList() method. Any pointers would be greatly helpful. Thanks, Sai

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

          Are you wanting to know which items in the list control are selected? If so, use the GetSelectedCount() and GetNextItem(..., LVNI_SELECTED) methods.

          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

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

          1 Reply Last reply
          0
          • V vjasai

            I have two methods.. OnCheck() which will check the record in listview control and another method Onchecklist() which will disabel or enable the buttons. Now my query is I want to check more than 1 record in the listview controls and store the indexes in an array. Then I want to pass each one to the OnCheckEPayList() method. Any pointers would be greatly helpful. Thanks, Sai

            M Offline
            M Offline
            Maximilien
            wrote on last edited by
            #5

            if you are using a CListBox, have a look at GetSelItems, but your list but be set to use multiselect (and/or extended select) style. if you are using a CListCtrl use CListCtrl::GetSelectedCount and CListCtrl::GetNextItem ( see this[^] )

            1 Reply Last reply
            0
            • D David Crow

              Cedric Moonen wrote:

              Please, think that we do not see your code...

              Come on, Cedric. When you took the oath to join the super-secret club, the welcome kit contained a pair of "spy" binoculars for just this purpose.

              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

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

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

              DavidCrow wrote:

              the welcome kit contained a pair of "spy" binoculars for just this purpose.

              Like those[^] we liked so much when we were kids? :laugh:

              Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all.
              Douglas Adams, "Dirk Gently's Holistic Detective Agency"

              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