I have a loop that executes a script running behind a GUI window. Most of the window is updated okay, but if focus is switched to a different program while the script is running it often will not refresh properly. Are there any commands to force a repaint on a GUI window?
Also when updating a TextArea on the window, the text is not refreshed immediately.
My loop mainly consists of a call to the script library for to run the script for a time slice, then a call to WaitEvent(). I have set up a timer with CreateTimer(4) to execute four times a second so that the whole thing doesn't get locked up but won't take up 100% CPU. I'm not quite sure about this technique but it seems to work okay, except for this refresh issue.
The script engine I'm using is MicroC.
Also when updating a TextArea on the window, the text is not refreshed immediately.
My loop mainly consists of a call to the script library for to run the script for a time slice, then a call to WaitEvent(). I have set up a timer with CreateTimer(4) to execute four times a second so that the whole thing doesn't get locked up but won't take up 100% CPU. I'm not quite sure about this technique but it seems to work okay, except for this refresh issue.
The script engine I'm using is MicroC.