Item and column indexes start at 0. If you want to have two columns, you must insert two:
InsertColumn(0, _T("Column 1"), LVCFMT_LEFT, 100, 0);
InsertColumn(1, _T("Column 2"), LVCFMT_LEFT, 100, 1);
Then add items to the list where
InsertItem()
specifies the main item which is shown in the first column and the additional columns are specified by
SetItemText()
:
InsertItem(0, _T("Item 1-1"));
SetItemText(0, 1, _T("Item 1-2"));
InsertItem(1, _T("Item 2-1"));
SetItemText(1, 1, _T("Item 2-2"));