update ui after threded calculation?

Chris Elliott biol75 at york.ac.uk
Wed Apr 9 11:57:54 PDT 2008


try MyWindow->Update() which will cause a redraw of the window when  
ready

chris

http://biolpc22.york.ac.uk/wx/docs/html/wx/wx_wxwindow.html#wxwindowupdate
On 9 Apr 2008, at 19:47, c.Kleinhuis wrote:
> Hi there,
>
> i do have a worker thread which is rendering some images, how do i  
> correctly tell wxwidgets to update the ui ?
>
> i am trying with
>
> AddPendingEvent(wxUpdateUIEvent());
> wxWakeUpIdle();
>
>
> in the thread, calling in the window i want to redraw, but the  
> window does not really
> gets redrawn .. i tried also
>
>   AddPendingEvent(wxUpdateUIEvent());
> wxWakeUpIdle();
>
> in my thread loop i have a sleep(1) but no yield()
>
> what seems to be the problem here ?
>
> thx
> ck
>
> _______________________________________________
> wx-users mailing list
> wx-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-users



More information about the wx-users mailing list