X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6427d4da424cadbea08b70e964ab1a93246f67d..d1935bf638f655cc356689df0af46d801c7d1bee:/samples/thread/thread.cpp diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp index 078442a786..ad2ca59220 100644 --- a/samples/thread/thread.cpp +++ b/samples/thread/thread.cpp @@ -305,14 +305,14 @@ void *MyWorkerThread::Entry() event.SetInt( m_count ); // send in a thread-safe way - wxPostEvent( m_frame, event ); + wxQueueEvent( m_frame, new wxCommandEvent(event) ); wxMilliSleep(200); } wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, WORKER_EVENT ); event.SetInt(-1); // that's all - wxPostEvent( m_frame, event ); + wxQueueEvent( m_frame, new wxCommandEvent(event) ); return NULL; } @@ -416,7 +416,7 @@ bool MyApp::OnInit() menuBar->Append(menuHelp, _T("&Help")); frame->SetMenuBar(menuBar); - + // Show the frame frame->Show(true); @@ -431,7 +431,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) { SetIcon(wxIcon(sample_xpm)); - + m_nRunning = m_nCount = 0; m_dlgProgress = (wxProgressDialog *)NULL;