Click here to Skip to main content
15,920,031 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hy I have a LVITEM control is my application .
it has many row . I want to get value of row and column (z,y) .
How can I do this ?
Posted

I believe you want to enumerate the values of all the rows and columns in the list control.
If this is true, please read the rest of my post.

1. Use ListView_GetItemCount[^] to get the number of rows in the control.

2. Use ListView_GetHeader[^] to get the header control of the list view.

3. Use Header_GetItemCount[^] to get the number of columns in the control.

4. Create a nested loop with the number of rows as the loop count for the upper loop and the number of columns as the loop count for the inner loop.

5. Use ListView_GetItemText[^] to get the text with the outer loop counter as iItem and the inner loop counter as iSubItem.
 
Share this answer
 
Take a look at this article from Matt weagle, it is a novice level article which will show you how to use the CListCtrl well.

Using the List Control[^]

Of course the <<_Superman_>> post is great, but this is a little bit more of information that never harms...

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900