ListBox用法

来源:互联网 发布:linux移动文件夹 编辑:程序博客网 时间:2024/05/18 06:23
在列表框生成后需要向其中加入或是删除行,可以利用:
int AddString( LPCTSTR lpszItem )
添加行,
int DeleteString( UINT nIndex )
删除指定行,
int InsertString( int nIndex, LPCTSTR lpszItem )
将行插入到指定位置。
void ResetContent( )
可以删除列表框中所有行。

通过调用int GetCount( )得到当前列表框中行的数量。


自动显示最后一行

m_list.SetTopIndex(m_list.AddString(Str));


原创粉丝点击