Click here to Skip to main content
15,943,406 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I dont know if anyone wants to help me out but I will give it a try.
My code is like
void CTabDlg::addParticipant(CString strAdd)
{
	size_t matchO,matchM;
	matchO = strAdd.Find("Office:");
	matchM = strAdd.Find("Mobile:");
	if(matchO!=string::npos)
	{
		strAdd.Replace("Office: ",NULL);
		LVFINDINFO info;
		info.flags = LVFI_PARTIAL|LVFI_STRING;
		info.psz = strAdd;
		if(strAdd!="" && listParticipant.FindItem(&info,-1)==-1 && participantIndex<16)
		{
			listParticipant.InsertItem(LVIF_TEXT,participantIndex, strAdd,LVIS_SELECTED, LVIS_SELECTED,0, 0);
			participantIndex++;
		}
	}
}


I have a list control called listParticipant.
when I choose list view...everything displays perfectly when I do listParticipant.InsetItem()....
when I choose report view...everything that is inserted into the control using InsertItem() disappears or is not visible...

anyone knows why?
desperate help needed
Posted

1 solution

For the report style you should insert at least one column: CListCtrl::InsertColumn[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900