You could queue the updates. Search 'queue' in subject in source code forum.
However, this is pretty much what PostMessage() does, although if you have the thread ID handy PostThreadMessage() might be worth a try, too.
Announcement
Collapse
No announcement yet.
Updating a listview
Collapse
X
-
Did you try PostMessage instead SendMessage?
Regards,
RValois.
Leave a comment:
-
Updating a listview
I have a voice response telephony application which uses a main thread, running the applications GUI, and 60 threads for the individual phone lines.
This runs fine, but all threads must give their status to the main listview, so one can see what callers are doing at that moment.
(Which texts are played, and what choices are made)
First I used SendMessage from the threads, but that was a heavy load due to all the context switches this causes. (There can be 20 or 30 updates a second)
Now I created a global FIFO buffer where the threads dump their updates, and the main thread puts them into the listview.
This works, but I was wondering if there is a more 'elegant' way to do this...Tags: None
Leave a comment: