Hello Community
I want an example with a Virtual Listview
I set the style to LVS_OWNERDATA and lock this before fill the ListView
invoke LockWindowUpdate,hLV
;Fill listview items
invoke SendMessage,ebx,LVM_GETITEMCOUNT,0,0
mov lvi.iItem,eax
mov lvi.imask,LVIF_TEXT
mov lvi.iSubItem,0
m2m lvi.pszText,pData
invoke SendMessage,ebx,LVM_INSERTITEM,0,addr lvi
nvoke SendMessage,hLV,LVM_SETITEMCOUNT,nItems,LVSICF_NOINVALIDATEALL or LVSICF_NOSCROLL
invoke LockWindowUpdate,NULL
But After add items is this listView empty.
Have you an idea or a good example ?
regards,
Are you handling the LVN_GETDISPINFO notifications?
Hi
Must i handling LVN_GETDISPINFO?
Gives any good Tutorial about it or good example?
Quote from: ragdog on December 14, 2014, 10:01:31 PM
Must i handling LVN_GETDISPINFO?
Yes, that is how it works.
The whole point is that the listview does not store any data for the items (because you already have it and don't want to waste memory duplicating it all) -- you only tell it how many there are (
LVM_SETITEMCOUNT). Then, when the listview needs to display the data for specific items, it requests the information from you through
LVN_GETDISPINFO -- so you fill in the
LVITEM structure with the data for the item at the given index, and that is what it displays for that item.
Example attached 8)
Thank you Tedd
is well explained and the source is well written to understand it.
I test it this days in my project.
Regards,