Hello there,
I was trying to access a wxDialog members from a boost::thread:
void AnotherThread(myWxDialog *dlg)
{
wxMessageBox(dlg->TextBox1->GetValue(), "It works!"); // This throws an error
}
void myWxDialog::OnButtonClick(wxCommandEvent &event)
{
boost::thread myThread(AnotherThread, this);
}
And I got this error:
Unhandled exception at 0x004043d7 in MyProgram.exe: 0xC0000005: Access violation reading location 0xbaadf00d.
I think this kind of action is not allowed between different thread.
So, is there any other way to do the same thing?
Any kind of help would be appreciated. :)
(Microsoft Visual C++ 2008 Express Edition)