CodePudding user response:
If you are in the thread directly transferredM_listctrl. SetItemText ()
Want to be no good BuKa, because you did not leave time for response to other messages.
Threadfunction
{
Sleep (10);//must sleep yourself, equinoctial time slice to the main thread;
}
And there is a problem, m_listctrl insert so much data, in fact users only see part of the data, that is to say, you can actually save the received data, such as the user to display a page, when going through without the insert 1400, is a bit scary, but also bad experience,
To 28 * 14 * 100 or 50 is not better? Show only the part of every time
CodePudding user response:
If a large amount of data, you should not be all show, paging, etc., of data update only one page at a time, to reduce the loss of performanceCodePudding user response:
Actually the list altogether has more than 30 lines, can all display a page, each line only data constantly change, I want these real-time observation data, it is not to the paging view, I'm filling in the LIBUSB read threads, just the LIBUSB continuously collect data, otherwise LIBUSB can read threads should be blocked, feel like tajon1226 said, if the delay 10 ms, I'm afraid I will be more poor real-time performance, don't know if I understand right?CodePudding user response:
1 do cache data, comparison before and after update. If the same would skip2 time snapshot refresh, high refresh rate for human eyes does not make sense
CodePudding user response:
M_list. SetRedraw (FALSE);//add content
XXXX
//update content
M_list. SetRedraw (TRUE);
CodePudding user response:
Refresh fast doesn't make sense, all the data collect, the notification window from memory refresh ListCtrlCodePudding user response:
This is not what acceleration is not problem,Should open another thread is dedicated to the receiving data, the main thread is used to display data, only by this way, want to is difficult