In a CPU-time consuming application I want to inform the user of the progress and give the possibility to stop the app and change the parameters. My problem is that the menu with the look for and stop items become visible after all the arithmetical work. How to arrange this better.
With regards,
Jan van der Graaf
Posted on 2002-11-06 14:37:45 by janvdgraaf
(I moved the thread to main since it isn't directly related with Iczelion's tutorials)
Just put the calculation stuff inside the thread, and every now and then use WaitForSingleObject in that thread to check if an event has been set. In the main program you can then set the event when you want the thread to do something (stop, pause, etc). From your code I see you are already using a thread but you should put the calculations in the thread and only the control (start, stop, pause) in the main program (not the other way around).

Thomas
P.S. Welkom op het forum :)
Posted on 2002-11-06 14:55:53 by Thomas
I think that Icz does pretty much what you want to do .. I haven't looked at your code though.

But check out Icz lesson16 http://spiff.tripnet.se/~iczelion/tut16.html

And yes .... welcome:cool:
Posted on 2002-11-06 15:11:22 by gorshing
Thanks for both replies. Now the skeleton works fine. It?s time to fill it with real stuff. (Scheduling problem focused on schooltimetable).
Jan van der Graaf
Posted on 2002-11-08 08:53:12 by janvdgraaf