list control report view problem

I dont know if anyone wants to help me out but I will give it a try.
My code is like
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
Topic archived. No new replies allowed.