My List View is set to Report style.
I can add data to the first column fine, but when I try to use the iSubItem flag, the string is not added to the second column.
Code:lvColumn.mask = LVCF_TEXT | LVCF_WIDTH; lvColumn.cx = 100; lvColumn.pszText = "Column 1"; ListView_InsertColumn(hWndListView, 0, &lvColumn); lvColumn.pszText = "Column 2"; ListView_InsertColumn(hWndListView, 1, &lvColumn); lvItem.mask = LVIF_TEXT; lvItem.pszText = "row 1, col 1"; ListView_InsertItem(hWndListView, &lvItem); lvItem.pszText = "row 2, col 1"; ListView_InsertItem(hWndListView, &lvItem); lvItem.iSubItem = 1; lvItem.pszText = "row 1, col 2"; ListView_InsertItem(hWndListView, &lvItem);




Reply With Quote