- // Create the main frame window
- MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340);
+ // Create the main frame window
+ MyFrame *frame = new MyFrame((wxFrame *)NULL, "wxWindows threads sample",
+ 50, 50, 450, 340);
+
+ // Make a menubar
+ wxMenu *file_menu = new wxMenu;
+
+ file_menu->Append(TEST_CLEAR, "&Clear log\tCtrl-L");
+ file_menu->AppendSeparator();
+ file_menu->Append(TEST_ABOUT, "&About");
+ file_menu->AppendSeparator();
+ file_menu->Append(TEST_QUIT, "E&xit\tAlt-X");
+ wxMenuBar *menu_bar = new wxMenuBar;
+ menu_bar->Append(file_menu, "&File");
+
+ wxMenu *thread_menu = new wxMenu;
+ thread_menu->Append(TEST_START_THREAD, "&Start a new thread\tCtrl-N");
+ thread_menu->Append(TEST_START_THREADS, "Start &many threads at once");
+ thread_menu->Append(TEST_STOP_THREAD, "S&top a running thread\tCtrl-S");
+ thread_menu->AppendSeparator();
+ thread_menu->Append(TEST_PAUSE_THREAD, "&Pause a running thread\tCtrl-P");
+ thread_menu->Append(TEST_RESUME_THREAD, "&Resume suspended thread\tCtrl-R");
+ menu_bar->Append(thread_menu, "&Thread");
+ frame->SetMenuBar(menu_bar);
+
+ // Show the frame
+ frame->Show(TRUE);
+
+ SetTopWindow(frame);
+
+ return TRUE;
+}