I have a dialog which creates a thread during its PostLayoutDynInitL. The thread periodically needs to SetAndDraw the value of a progress control (CEikProgressInfo). At the moment the SetAndDraw call seems to update the value of the progress control, but it doesn't get re-drawn unless I actually click on the dialog to get it to refresh. If I wait until the thread calls SetAndDraw 2 times without clicking on the dialog to get it to refresh, then I get a crash on the second SetAndDraw call.
I've tried calling SetFocus, ActivateL, DrawNow, DrawDeferred, and MakeVisible all to no avail. I've also tried changing the code so that the thread actually calls the dialogs OkToExitL function with a specific keycode, and then it performs the SetAndDraw, but this didn't help.
Anyone got any idea how I can get this working, or have any example code on how to code a thread to update a control in a dialog?
Thanks in advance.