I'm using ListView to list the content of a directory, now i have a problem : when a directory
has more than 1000 files in it, it takes very long to show them in the listview. i'm using an imagelist to show the system-icon of the files and the SHGetFileInfo function to get the index of the files icon in the imagelist.:confused:
Posted on 2002-02-13 02:26:10 by [kyx]
Hi

One way to speed this up is to get the extra file info on the visible nodes only. A bit advanced programming is needed tho.
Also sorting the listview after it is populated might help. You can also send it a WM_SETREDRAW to prevent screen update while populateing the list.

KetilO
Posted on 2002-02-13 02:46:42 by KetilO
I made something similar, and I found out, that reading the files takes not much time, most time is taken by reading the icons.

Maybe you can make an extra thread, which reads the icons separately. Meanwhile you can setup a default icon.

This is also the way that Windows Explorer does.
Posted on 2002-02-13 03:24:55 by beaster
It also depends on the control you're using and the speed of your computer... I once tried to put 6000 top level nodes into a treeview each with two childern and the treeview became very slow to use... I have heard about doing virtual listviews and treeviews which hold a certain amount of info in memory not in the control, never tried but i sounds like they work very well!
Posted on 2002-02-13 11:41:34 by JamesE
Hi,

did someone have an example of readings files/dirs with icons in a listview ?

Greetings,
Nordwind64
Posted on 2003-04-13 23:44:30 by Nordwind64
Hi,

I saw a very good one once, "Win32asm File Manager" on Iczelions site. As far as I can remember it was Ewayne's work. If it's not there anymore I should still have it archived somewhere.
Posted on 2003-04-13 23:50:49 by donkey
Posted on 2003-04-14 02:37:00 by roticv