I'm having trouble dispalying info into a ReportView style CListCtrl. So far I can only display information in the first column but not in the second column. Can you tell me what I'm doing wrong here.
// Creating columns
m_listDevice.InsertColumn( 0, "DevName",LVCFMT_LEFT, 50);
m_listDevice.InsertColumn( 1, "Time", LVCFMT_LEFT, 50);
// Insert into columns
int index = m_listDevice.GetItemCount();
LV_ITEM item;
memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_PARAM | LVIF_TEXT | LVIF_IMAGE;
item.iItem = index;
item.iImage = 1;
item.iSubItem = 0;
item.pszText = pDevice->m_csName;
item.lParam = (long)pDevice;
index = m_listDevice.InsertItem(&item);
item.iItem = index;
item.pszText = "3:05";
item.iSubItem = 1;
item.lParam = NULL;
item.iImage = 1;
m_listDevice.SetItem(&item);
thanks
// Creating columns
m_listDevice.InsertColumn( 0, "DevName",LVCFMT_LEFT, 50);
m_listDevice.InsertColumn( 1, "Time", LVCFMT_LEFT, 50);
// Insert into columns
int index = m_listDevice.GetItemCount();
LV_ITEM item;
memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_PARAM | LVIF_TEXT | LVIF_IMAGE;
item.iItem = index;
item.iImage = 1;
item.iSubItem = 0;
item.pszText = pDevice->m_csName;
item.lParam = (long)pDevice;
index = m_listDevice.InsertItem(&item);
item.iItem = index;
item.pszText = "3:05";
item.iSubItem = 1;
item.lParam = NULL;
item.iImage = 1;
m_listDevice.SetItem(&item);
thanks