I seam to be having a problem with setting a sub item in a list view.

invoke SendMessage, hProcList, LVM_INSERTITEM, 0, addr lvi
lea eax, pe.szExeFile
mov lvi.pszText, eax
mov lvi.iSubItem, 1
invoke SendMessage, hProcList, LVM_SETITEM, 0, addr lvi

After the LVM_INSERTITEM the correct text is added to the item indicating everything is set up but then I want to change the list view item structure to point to new text and give it a subitem off 1 to add this text to the next collumn of the current item. But after LVM_SETITEM is sent the second column is empty. Dose anyone have any ideas.
Posted on 2002-03-15 10:18:38 by Quantum
You must have missed the following in the api help file/msdn:

You cannot use ListView_InsertItem or LVM_INSERTITEM to insert subitems; the iSubItem member of the LV_ITEM structure must be zero.

That's taken from the LVM_INSERTITEM page. Instead, you must use LVM_SETITEM.

This is actually a coincidence since I had tried the same thing yesterday, before finally realizing the mistake. :)
Posted on 2002-03-15 12:48:49 by Will