General information
Category:
Windows API functions
Title:
Listview Insertitem API
Has anyone managed to add items to a listview under the following conditions:
Viewstyle = report mode
Number of columns > 1
I can add without any problems using the Sendmessage api if I don't have any subitem columns or I am not in report mode. If I am then I get Memory read/write failures around the H275a5fb5 address. I managed to work around this by adding an item using the normal control method, then using the LVM_GETITEM message to study the LVITEM structure. I found that the LParam element had a memory address pointer value in it. By allocating my own memory space and copying this memory area across (about 408 bytes at a guess), the error stopped. With further analysis I see that this memory area contains pointers to various addresses within the Listview class and the storage of the Key and Tag listitem properties (amongs others I assume). I managed to get it working in vbce for my PDA without any of these issues, so I am not sure what the problem is in normal VB. If anyone has any insite into this I would greatly appreciate it.
Thanks.
Brett.
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only