123456789101112131415161718192021
void CTabDlg::addParticipant(CString strAdd) { int nItem; CImageList imgList; imgList.Create(16, 16,ILC_COLOR8, 0, 0); CBitmap bm; bm.LoadBitmap(IDB_BITMAP1); imgList.Add(&bm, RGB(255, 255, 0)); //lParticipant.SetImageList(&imgList, LVS_SMALLICON); LVITEMA imgText; nItem=lParticipant.InsertItem(participantIndex, strAdd,0); imgText.iItem=nItem; lParticipant.SetItemText(nItem,1,"aa"); lParticipant.SetItem(&imgText); participantIndex++; }