Click to See Complete Forum and Search --> : ListCtrl basics


-=SKULK=-
May 26th, 1999, 04:21 PM
Hi
I have a problem with a ListCtrl (Sort Ascending)
When I insert the Items, only the item which was inserted at last has subitems, all other items dont have whats wrong?
I inserted the items like this
m_pLC->InsertItem(0, str1);
m_pLC->SetItemText(0, 1, str2);

thanks in advance


--
-=SKULK=-

Martin Speiser
May 27th, 1999, 02:50 AM
Hi Skulk,

use the value returned by InsertItem as the first parameter in SetItemText.


int nItem = m_pLC->InsertItem(0, str1);
m_pLC->SetItemText(nItem, 1, str2);





Martin