Hey all, for some reason I'm having trouble with listview. I've got it created and pretty. The columns are set and titled. That much is fine.
I have 3 columns and my listview is hList. I just cant seem to add any items to it...
What I'm needing is how to add a row with 3 columns.
Thanks :)
Hi Cyrus,
Without any code or a clear idea with what's happening I can't be of much help however I have a couple of samples demonstrating listviews on my website, they are written in GoAsm but that is easily translated to MASM syntax, you can take a look at...
www.assembler.ca
You will find them in the GoAsm projects section, also WinExplorer makes use of a few listviews including a virtual one. Source code is included for all samples and WinExplorer.
Donkey
Well Im using RadASM with masm. And the actual application is comparing the hex dumps of 2 files. Once a difference is detected i want to add the offset, old byte, and new byte. Got all the information and it works just cant add it to the listview.
Here' s what the listview looks like:
OFFSET OLD BYTE NEW BYTE
They are in buffer1,buffer2, and buffer3 that the time item needs added.
Ok I've managed to get it. Confusing that it uses 2 api's to do one thing.
hi
mean your this?
AddItem PROC _Item1:DWORD,_Item2:DWORD,_Item3:DWORD
LOCAL Item :LV_ITEM
mov Item.imask,LVIF_TEXT
mov ebx,_Item1
mov Item.pszText,ebx
mov Item.iSubItem,0
invoke SendMessage,hList,LVM_INSERTITEM,0,addr Item
mov Item.iItem,eax
inc Item.iSubItem
mov ebx,_Item2
mov Item.pszText,ebx
invoke SendMessage,hList,LVM_SETITEM,0,addr Item
inc Item.iSubItem
mov ebx,_Item3
mov Item.pszText,ebx
invoke SendMessage,hList,LVM_SETITEM,0,addr Item
inc Item.iSubItem
inc Item.iItem
ret
AddItem ENDP
greetz
ragdog
Yes ragdog exactly. I wasnt using the LVM_SETITEM. MSDN was confusing when I read up on it. But, a great example just the same. :)