I have a CListCtrl in report view. When I try
Code:
int index = prefsD->m_CcontactList.InsertItem(0,entry->name);
prefsD->m_CcontactList.SetItem(index, 1, LVIF_TEXT, entry->real_name, 0, 0, 0, NULL);
prefsD->m_CcontactList.SetItem(index, 2, LVIF_TEXT, entry->medium, 0, 0, 0, NULL);
The item is inserted correctly by the first line, but both calls to SetItem fail. However if I change the iSubItem (2nd parameter) to 0, they work just fine (but in the wrong column obviously)

I thought perhaps I had the columns set up incorrectly, but I do not believe this is the case:
Code:
m_CcontactList.InsertColumn(0, "Name", LVCFMT_LEFT, 75);
m_CcontactList.InsertColumn(1, "Real Name", LVCFMT_LEFT, mwidth);
m_CcontactList.InsertColumn(2, "Medium", LVCFMT_LEFT, mwidth);
SetItemText does not seem to work either (same results as above)

I am on WinXP Pro, with VC++ 6.0 and in this project using MFC. Can anyone see my mistake or offer any suggestions?

Thanks,
Chris