码迷,mamicode.com
首页 > 其他好文 > 详细

TListView的一些操作

时间:2016-06-09 12:17:55      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:

1,让滚动条滚动的API

 

SetScrollPos

 

int SetScrollPos(     _In_  HWND hWnd,     _In_  int nBar,     _In_  int nPos, _In_  BOOL bRedraw );

 

2,让listview滚动到行首,并不是用 SetScrollPos解决

下面代码中 d_listview 是一个指向TListView对象的指针。

关键引述是用 MakeVisible 函数,他确保你指定的行一定会被看见。

但这一行并不需要是焦点行

    if (d_listView != NULL && d_listView->Items->Count > 0)
    {

        d_listView->Items->Item[0]->MakeVisible(false);


    }

 

TListView的一些操作

标签:

原文地址:http://www.cnblogs.com/songr/p/5572164.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!