I have written a program in C++ using MFC (VS 2013). The program works just fine as long as it's running on a WIndows 7 machine. When I install the program on Windows 8, it crashes with a problem related to CLIstCtrl. The list control in question has 13 visible lines. However, when the 14th line of data is added using CListCtrl::InsertItem(), the program crashes. I use the loop below to fill the list, which is a member variable called mDispList:
for (int row = 0; row < NmbrRows; row++)
lvi.iItem = row;
mDispList.InsertItem(LVIF_TEXT, row, _T("A"), 0, 0, 0, 0);
mDispList.SetItemText(row, 1, _T("B"));
mDispList.SetItemText(row, 2, _T("C"));
mDispList.SetItemText(row, 3, _T("D"));
I have found a few cryptic references to this problem online but nothing with a clear answer. Does anyone know how to solve this problem?
Thanks very much.