Simultaneous execution of main and thread (containing a form) in Borland C++
Posted on 2011-10-13
This seem like a tricky situation, but I'm not much of a Thread programmer. I have a Borland C++ program where the main form has an OnMessage handler that performs additional form navigation, mostly processing the ENTER key as TAB key. The main form creates a 2nd form that runs concurrently with the 1st form. Before the OnMessage function I could click either form and get control in that form. After the OnMessage handler was written I was locked on one form.
I got the bright idea of executing the 2nd form in a thread. Execution is fine, but the 2nd form never appears since, once again, I'm assuming the main form never gives up control. What I need is to be able to have the main form create the 2nd form and gain control of either by simply clicking one or the other of the forms. A Thread solution or a non-Thread solution is fine with me.