+// set the frame title indicating the current number of threads
+void MyFrame::OnIdle(wxIdleEvent &event)
+{
+ size_t nRunning = 0,
+ nCount = m_threads.Count();
+ for ( size_t n = 0; n < nCount; n++ )
+ {
+ if ( m_threads[n]->IsRunning() )
+ nRunning++;
+ }
+
+ wxString title;
+ title.Printf("wxWindows thread sample (%u threads, %u running).",
+ nCount, nRunning);
+ SetTitle(title);
+}
+
+void MyFrame::OnSize(wxSizeEvent& event)