Try this...
for (nItem=0; nItem<numberOfRows; nItem++)
{
// Insert a the item first with a blank
m_yourListCntl.InsertItem(nItem, " ");
// Populate the screen with the new data
m_yourListCntl.SetItemText(nItem, 1, "SubItem1_Text");
m_yourListCntl.SetItemText(nItem, 2, "SubItem2_Text");
Quote:
}
| Hi,
|
| I am using a CListCtrl directly within a dialog box. I use its member
| function InsertColumn( ) to create columns, and InsertItem() to create
| new items. After these are done, I tried to use SetItemText() to set
| the text for the sub items. For some reason, only some of the text
| would show up within the control and some don't. Has anyone experience
| this problem? Does anyone knows what I have done wrong?
|
| Any suggestion is appreciated, Thanks in advance!!!
|