CListCtrl List Style :: MFC
I added a simple CListCtrl box with a List style to a dialog box. However, I cannot insert more than one item. Another possible problem is that Windows is not drawing the other items. Nonetheless, only one item shows up. Here is an example what how I inserted items.
After the insertion above, only one line of "Novermber" will show up in the CListCtrl box.
Item.mask = LVIF_TEXT;
Item.state = LVIS_SELECTED;
Item.stateMask = LVIS_SELECTED;
Item.cchTextMax = 0;
Item.iImage = 0;
Item.lParam = 0;
Item.iSubItem = 0;
Item.pszText = TEXT("November");
// I would like to insert ten items in the list box.
for (unsigned i = 0; i < 10; ++i)
I have worked with CListCtrl boxes using Report Style. I have not had this problem. I would like to know why does it ignore all new items except the first line?