I have a problem with my QuickWin App, but first I describe the circumstances:
In my App I use a Modeless Dialog, where the user can change the calculation parameters. After the DlgModeless command I use
do while(GetMessage(mesg,NULL,0,0)) if (DlgIsDlgMessage(mesg).eqv..false.) then lret = TranslateMessage( mesg ) ret = DispatchMessage( mesg ) end if end do
to keep the App opened. To start the calculation, the user has to click on my own defined menu entry AppendMenuQQ(2,$MenuEnabled,'Calculation'C,start_calc). The calculationstarts and diagrams are painted etc.
The calculation hasa time limit, but the user should be able to change certain parameters while the calculation is made. But when I click on the dialog or press a button on the menu bar, the programm freezes, it seems that the diagrams wont paint any more. But when the time limit has been reached, everything is back to normal, the final diagram is shown and I can interact with the dialog.
I think that has something to do with the DlgModeless Message Loop and starting a new subroutine start_calc by a clicking the entry in the menu.
Do I have to use different threads for the main program and start_calc?