cbpporter Messages: 1428 Registered: September 2007
Ultimate Contributor
kodos wrote on Wed, 05 March 2008 00:48
But that's the point: How should I update the GUI in my callback if I'm not allowed to?
I could poll an a variable if it is finished but then my solution with IsFinished would be easier IMHO.
The point is that only you main thread can update the GUI. If you're callback belongs to the main thread, then there is no problem with it. Create the callback member function in you main window class for example, and everything will work fine.
Did you look over reference/GuiMT example? It creates a callback at the end of the thread with Divisors::ShowResult, which then does the updating.