FillFileList PROC
INVOKE GetAllDirsAndFiles, 0 ;Start @ file entry[0] ("root").
INVOKE SendMessage, DialogHandle, $MSG_FillTreeview, 0, 0
INVOKE ExitThread, 0
RET
FillFileList ENDP
BTW, is that RET even ever reached? can I remove it?start a new scan:
BusyFindingFlag = TRUE ;locks out controls while scan is in progress
create "root" item in treeview
PutUpProgressBar():
show "Waiting:" (static text)
show progress bar
set progress bar in marquee mode (PBM_SETMARQUEE)
CreateThread() for FillFileList():
(everything at this level is in the new thread)
FindAllDirsAndFiles() ;this is the recursive routine that takes a lot of time
Send $MSG_FillTreeview to the dialog
which calls FillTreeview() to populate the treeview
ExitThread()
Hopefully that makes sense. It works find so far as the application goes, but the progress bar control never moves. From reading a lot of stuff online about this (none of it on Micro$oft Learn, however!), it seems that what's happening is that the main thread of the program isn't getting enough cycles to service the progress bar. (My next move is to monitor the messages going to that control.)Quote from: sinsi on Today at 12:29:32 PMIt's a silly idea as far as using it for something so trivial...Right. That's why you would do as many conversion as possible to justify the overhead... not just one conversion. The overhead might negate any savings otherwise. Would be perfect for a spreadsheet, methinks.
Quote from: sudoku on Today at 12:19:41 PMAre you already experimenting with it?I'm waiting for someone to tell me "you're crazy" or "hmmm, interesting".
Quote from: sinsi on Today at 12:02:37 PM...multithreaded hex$You would have to include the overhead for the thread creation, etc. in the times... to be fair to the other algos == not from thread(s) start to thread(s) end only. Are you already experimenting with it?