I usually list a file from a spesific directory (Example: C:\) with API FindFirstFile & FindNextFile in a looping.
But, this API will works slowly if I want to list a file from a directory (Example: C:\folder1\ who has > 1000 files in it).
As the result, the user will wait for a seconds until API FindNextFile arrive at the end of the file from that directory.
And this waiting time will annoyed for the impatient user. :lol
how to solve this?
would you like to share me a clue?
thank you.
best regards,
Elmo,
One trick is to turn off the list of listview dispay while you are loading it. Reduces the time to scan the whole directory. You are basically limited to disk IO speed in a task like this so there may not be any really fast alternatives to what you are doing.
; before the scan
fn LoadCursor,NULL,IDC_WAIT
fn SetCursor,eax
fn SendMessage,hlview,WM_SETREDRAW,FALSE,0
; after the scan
fn SendMessage,hlview,WM_SETREDRAW,TRUE,0