I am trying to open up a CVI gui from inside a RoseRT model.
1) I created a CVI static library and linked it into RoseRT
2) I am not using a UIR file - I performed a TOOLS (menu): UI-to-Code-converter
3) My gui code is still written in CVI-C, but will eventually be converted to MSVC++ so I can link the RoseRT model calls.
4) I traced my RoseRT model up to the RunUserInterface() call, where it stopped, and performed all the callbacks fine, but it never continued the RoseRT model - it just stopped at the RunUserInterface() call.
- I tried to separate the RunUserInterface() into another thread, and the thread ran, but the CVI GUI would not refresh -- so I could not press any of the buttons - (however the RoseRT model w
as running fine in a background thread).
5) I tried changing the RunUserInterface() thread into using the ProcessSystemEvents() call so I can control the thread, but it had no impact (still did not refresh, and callbacks were not working).
while( WaitForSingleObject(done,10)==WAIT_TIMEOUT )
{
ProcessSystemEvents();
}
Questions:
a) is the RunUserInterface() thread running at all?
b) why won't the display refresh so I can press buttons
c) when buttons get displayed (after a looooooong wait), why won't the callbacks execute?