需要列表控件LVM_SETTOPINDEX [英] List control LVM_SETTOPINDEX needed

查看:212
本文介绍了需要列表控件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.

推荐答案

  1. 使用LVM_GETITEMPOSITIONLVM_GETITEMRECT获取项目位置.
  2. 使用LVM_SCROLL滚动列表,使您的商品成为头等商品.
  1. Use LVM_GETITEMPOSITION or LVM_GETITEMRECT to obtain the items position.
  2. Use LVM_SCROLL to scroll the list so that your item is the top item.

这篇关于需要列表控件LVM_SETTOPINDEX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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