I have a wx 2.4.2 installed.
I capture frames from a camera and then process and display them.
In order to have an infinite loop I post an event and catch it with the same function. Here is my code:
Code: Select all
void GMainFrame::OnCaptureFrame(wxCommandEvent& frameLoopEvent)
{
panel->processFrame();
wxYield();
// Call the event loop to get back to this function.
if (!_stopCapture)
wxPostEvent(this, frameLoopEvent);
}
I use wxYield() because the frame is not displayed without it.
My problem is that because of wxYield(), my program is halted each time that a wxMessgae is issued (until the OK bottun is pressed).
My question is: is there any alternative way to allow text and image display without blocking the program when a message is issued or when the menu is opened?
Thanks in advance!