需要列表控件LVM_SETTOPINDEX [英] List control LVM_SETTOPINDEX needed
本文介绍了需要列表控件LVM_SETTOPINDEX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
列表视图控件具有
The list-view control has the LVM_GETTOPINDEX
message that allows to get the index of the topmost visible item.
现在我需要设置最可见的项目,但是令人惊讶的是,没有LVM_SETTOPINDEX
消息是自然的.
Now I need to set the topmost visible item, but surprisingly there is no LVM_SETTOPINDEX
message which would be natural.
是否有一种简单的清洁方法来设置最上面的项目?
Is there an easy clean way to set the topmost item?
我的列表控件始终处于报告模式.
My list-control is always in report mode.
推荐答案
- 使用
LVM_GETITEMPOSITION
或LVM_GETITEMRECT
获取项目位置. - 使用
LVM_SCROLL
滚动列表,使您的商品成为头等商品.
- Use
LVM_GETITEMPOSITION
orLVM_GETITEMRECT
to obtain the items position. - Use
LVM_SCROLL
to scroll the list so that your item is the top item.
这篇关于需要列表控件LVM_SETTOPINDEX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文