Hello! This also has to do with my prime app that I wrote about here. (http://www.masm32.com/board/index.php?topic=4909.msg36627#msg36627)
So I have a basic window dialog, and when you push the button, an algoritm launches. But while it's working you can't move the window/insert text anywhere/click any buttons. I think this is becouse the message handling thread is busy with my algoritm. Is there some way to like, create a new thread that processes all the messages sent to the dialog and hold the algoritm until all messages has been processed? Or is there some other better solution? :eek
thanks!
Do it the other way. Create a thread that processes your algorithm and leave the "main" thread processing the WndProc message loop. You just need a custom message sent back to the message loop when the algorithm thread is finished so that it knows when that occurs, and possibly a global status boolean flag set when the thread starts showing whether it is running, depending on how/whether you want to handle cancellations/shutdowns etc.
Ian_B
Thanks! Using this:
invoke CreateThread,NULL,NULL,addr FindPrimes,NULL,0,addr ThreadID
my program worked excelent! I had to pass the arguments to it manualy though. It was so easy I almost find it hard to beleve that there shouldn't be some more caller that automaticly creates a new thread for the call, like invoke_thread or something.