Actually, i'm creating a simulator type application. Now, there is a panel called 'drawingPanel' on which they simulation takes place. Now, in my program I want to paint on this panel with another thread, 'simulationThread'. But when I try to paint on the panel from inside the Entry() function of the thread using wxDC, I get a "wx debug alert" message box, saying
../../src/msw/dcclient.cpp(222):assert "Assert failure" failed in wxPaintDCImpl(): wxPaintDCImpl may be only created in EVT_PAINT handler! [in thread e0]
Do you want to stop the program?
You can also choose [cancel] to suppress further warnings.
And the program execution stops.
I do understand what the error message means, but I don't know how to fix it. Can somebody help?