获取LVITEM控件win32项目中的当前行和列 [英] get current row and column in LVITEM control win32 project

查看:125
本文介绍了获取LVITEM控件win32项目中的当前行和列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我的应用程序是LVITEM控件.
它有很多排.我想获取行和列(z,y)的值.
我该怎么做?

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 ?

推荐答案

我相信您想枚举列表控件中所有行和列的值.
如果是这样,请阅读我的文章的其余部分.

1.使用 ListView_GetItemCount [ ^ ]获取控件中的行数.

2.使用 ListView_GetHeader [ ^ ]获取列表视图的标题控件.

3.使用 Header_GetItemCount [ ^ ]获取控件中的列数.

4.创建一个嵌套循环,将行数作为上循环的循环数,将列数作为内循环的循环数.

5.使用 ListView_GetItemText [ ^ ]以获得带有外部循环计数器为iItem和内部循环计数器为iSubItem的文本.
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.


看看Matt Weagle的这篇文章,这是新手级别的文章.它将向您展示如何很好地使用CListCtrl.

使用列表控件 [
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!


这篇关于获取LVITEM控件win32项目中的当前行和列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆