Putting values in array
-
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
-
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
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] -
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]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
-
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
Are you wanting to know which items in the list control are selected? If so, use the
GetSelectedCount()
andGetNextItem(..., 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
-
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
-
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
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"