I have a problem using Treeview control, when I try to insert items it shows the first line empty without any caption as you can see in the picture: Figure1
First,I declared a variable called TreeCaption which holds the item caption:
TreeCaption db 'Testing!',0
then I called the procedure to insert a new item:
invoke InsertTreeViewItem,addr TreeCaption
This is the procedure:
InsertTreeViewItem proc psztext : DWORD
LOCAL tvi : TV_ITEM
LOCAL tvins : TV_INSERTSTRUCT
mov tvi._mask,TVIF_TEXT
push psztext
pop tvi.pszText
push tvi
pop tvins.item
pop tvins.hParent,TVI_ROOT
mov tvins.hInsertAfter,TVI_SORT
invoke SendMessage,hTreeview,TVM_INSERTITEM,0,addr tvins
ret
InsertTreeViewItem endp
Am working on RadASM as an IDE.