CListCtrl用法

1

The CListCtrl class encapsulates the functionality of a “list view control,” which displays a collection of items each consisting of an icon (from an image list) and a label. In addition to an icon and label, each item can have information displayed in colums to the right of the icon and label.

解释: item = icon + label + 右面的N个项..

          label = 第一列.

 

2

int column;

 column = m_list.InsertColumn( 0, "ID", LVCFMT_LEFT, 40 );//插入列
 column = m_list.InsertColumn( 1, "NAME", LVCFMT_LEFT, 50 );

 

解释: InsertColumn的第一个参数是你想要插入的列的值, 如果函数不能在你指定的列插入, 它会选择一个合适的列插入,然后利用返回值告诉你实际插入的列号.

 

3

int nRow = m_list.InsertItem(0, "11");//插入行
 m_list.SetItemText(nRow, 1, "jacky");//设置数据
 m_list.SetItemText(nRow, 2, "男");

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值