void WriteText(const wxString& text);
public:
- size_t m_count;
+ unsigned m_count;
MyFrame *m_frame;
};
public:
MyFrame *m_frame;
- size_t m_count;
+ unsigned m_count;
};
MyWorkerThread::MyWorkerThread(MyFrame *frame)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
+ if ( !wxApp::OnInit() )
+ return false;
+
// uncomment this to get some debugging messages from the trace code
// on the console (or just set WXTRACE env variable to include "thread")
//wxLog::AddTraceMask("thread");
void MyFrame::OnStartThreads(wxCommandEvent& WXUNUSED(event) )
{
- static long s_num = 10;
+ static long s_num;
s_num = wxGetNumberFromUser(_T("How many threads to start: "), _T(""),
_T("wxThread sample"), s_num, 1, 10000, this);
return;
}
- size_t count = (size_t)s_num, n;
+ unsigned count = unsigned(s_num), n;
wxArrayThread threads;
m_nRunning = nRunning;
m_nCount = nCount;
- wxLogStatus(this, wxT("%u threads total, %u running."), nCount, nRunning);
+ wxLogStatus(this, wxT("%u threads total, %u running."), unsigned(nCount), unsigned(nRunning));
}
//else: avoid flicker - don't print anything