WinSDK方式设置ListView控件指定位置数据

HWND hWnd=GetDlgItem(hDlg,IDC_INFOLIST);//获取控件句柄
ListView_SetItemText(hWnd,i,j,"数据数据");//设置第i行j列的单元格内容

ListView_SetItemText

VOID WINAPI ListView_SetItemText(
    HWND hwnd,
    int         i,
    int         iSubItem,
    LPCSTR pszText
);

Changes the text of a list view item or subitem. You can use this macro or send the LVM_SETITEMTEXT message explicitly. 

No return value. 

hwnd 
    Handle to the list view control. 

    Index of the list view item. 
iSubItem 
    Index of the subitem. To set the item label, set iSubItem to zero. 
pszText 
    Address of a null-terminated string that contains the new text. 
    This parameter can be LPSTR_TEXTCALLBACK to indicate a callback item for which the parent window stores the text. In this case, the list view control sends the parent an LVN_GETDISPINFO notification message when it needs the text. 
    This parameter can be NULL. 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值