I've got a nice little button:
MyThread newThread(&m_SerialText, &m_SerialTextControl, this);
m_SerialText is a variable connected to an Edit Box.
m_SerialTextControl is a control variable to the Edit box.
In the CreateNewThread I do the following
m_SerialText->Insert(m_SerialText->GetLength(), "nice thread");
This does not work exacltly the way I want it to work. The edit box text is not updated until the thread is finished.
I've tried to add m_SerialTextControl->UpdateData(FALSE); but then the program craches.
How do you update a text in an edit box from a thread?