Hello all,

If you have eva done a spy++ on windows explorer's Listview you won't find the LVS_OWNERDATA style bit set. So my question would be if it isn't a virtual listview then how are the items added so fast, i mean compared to my best implementation of the listview i still get a massive delay. LVM_SETITEMCOUNT says that if you ...

If the list-view control was created without the LVS_OWNERDATA style, sending this message causes the control to allocate its internal data structures for the specified number of items. This prevents the control from having to allocate the data structures every time an item is added.

then i assume that it will be faster but do you use LVM_INSERTITEM? I have tested that LVM_SETITEM doesn't work when you have used LVM_SETITEMCOUNT as specified above. So what messages/method to you apply if you wish to obtain such a fast result without having to apply LVS_OWNERDATA ~ or is that the only way.

Or can you still use NMLVDISPINFO, and then just add in the data there after doing a LVM_SETITEMCOUNT?

Black iCE
Posted on 2004-08-07 02:13:41 by Black iCE
Try sending WM_SETREDRAW with wparam = 0.
Then add all the items, and send WM_SETREDRAW again with wparam = 1.
That might speed things up for you a bit.
Posted on 2004-08-07 12:48:25 by iblis

Try sending WM_SETREDRAW with wparam = 0.
Then add all the items, and send WM_SETREDRAW again with wparam = 1.
That might speed things up for you a bit.


I know when I don't use virtual listviews, I definitely turn off the redraw while I add items. Same goes for Listbox too. This makes a big difference. :)

Relvinian
Posted on 2004-08-07 22:45:39 by Relvinian
Right - thank you ALL (iblis + Relvinian) for your input here but the WM_SETREDRAW works somewhot but that isn't sufficiend enough to achieve that spped of browsing. So two things must happen. Either explorer precashes the subdirectories (say the first couple of items) and the when you browse completes the operation and secondly does something similar to Virtual ListViews.... linking the item to memmory objects rather than using the internal lists.. (shown by the fact that when i attepmted using the non-vitrual approach the memory used was directly related to the ammount of items while in explorer it stays relativly constant).

Also usage of a thread to handle the vistual aspects... delay on getting propper icons see IExtractIcon::Extract icon cahing.

So i think the best way is to stick to virtual style..... cause the other might need me to take a look in explorer and i don't think i have the time nor stomach (brain) for it :grin: so lets leave it at that (i am happy to use vitrual).

(Relvinian hit refresh to see this post :alright: )

Cheers,
Black iCE
Posted on 2004-08-07 23:17:27 by Black iCE