Hi,
Need help from anyone who has created a treeview and needing to update the item label. Which control message should I use?
I had a routine that inserts the item (e.g. "Parent" label) into the treeview. The user can change that item label (e.g. from "Parent" to "Child"). I tried using TVM_SETITEM but would not work. The application crashed.
mov eax,[hParent] ; EAX = Patent handle
mov tvis.hParent,eax
mov tvis.itemex.imask, TVIF_TEXT ; set mask to text change
mov tvis.itemex.pszText,esi
mov eax,[hLevel] ; item handle
mov tvis.itemex.hItem,eax ;
invoke SendMessage,hTvwGroup,TVM_SETITEM,0,addr tvis
The application crashed at SendMessage. Does anyone know what have I done wrong?
Thanks...newAsm
Are you sure your TVITEM/EX structure is correct? -- I don't see the hParent in either of them
Also, try using the plain old TVITEM struct instead of the extended version..
Thanks Tedd, for asking if I used the right structure. You are right, I used the wrong structure. I have fixed it.
Thanks for responding..newAsm