Re: [Dev-C++] how to update data constantly?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2007-12-06 10:41:20
|
One alternative is to let the RS232 thread send messages to the GUI thread. Either with the serial data, or just as information that there are serial data available. /pwm On Wed, 5 Dec 2007, Jessica Chen wrote: > My whole projects have two thread. > one thread is reading RS-232 communication port. > another thread is Win32 GUI to display the data got from RS-232 > communication port. > > The design I had is: > Buttons on Win32 GUI. > So when the button is clicked, the corresponding data is read from RS232 > thread, and display in the GUI thread. > > BUT I want to have a constantly updated display. That is, there is NO > button to trigger the data update. > When the data of RS232 thread is updated, my display of GUI thread need to > be updated. > What should I design? > > My consideration for the design is: > add a constant interval timer to trigger the data update. > but how to implement it? > and do you have any other good idea? > |