I have a dialog box with an edit box and a connect button and I would like to update the data on my edit box continuosly. I am using the Serial class found here:
I am having difficulty putting my code after the OnConnect in a loop(the program locks up):
//m_data is the variable of my edit box
nBytesToRead = serial.ReadDataWaiting();
char *buffer = new char[nBytesToRead];
nBytesRead = serial.ReadData(buffer ,nBytesToRead);
m_data = buffer;
I have tried using sleep but it doesn't work either.Anyhelp would be appreciated. Thank you.