+ (void)new wxStaticText(this, -1, "Press OK to hide me, Exit to quit.",
+ wxPoint(10, 20));
+
+ (void)new wxStaticText(this, -1, "Double-click on the taskbar icon to show me again.",
+ wxPoint(10, 40));
+
+ (void)new wxButton(this, wxID_EXIT, "Exit", wxPoint(185, 230), wxSize(80, 25));
+ (new wxButton(this, wxID_OK, "OK", wxPoint(100, 230), wxSize(80, 25)))->SetDefault();
+ Centre(wxBOTH);
+}
+
+
+enum {
+ PU_RESTORE = 10001,
+ PU_NEW_ICON,
+ PU_EXIT,
+};
+
+
+BEGIN_EVENT_TABLE(MyTaskBarIcon, wxTaskBarIcon)
+ EVT_MENU(PU_RESTORE, MyTaskBarIcon::OnMenuRestore)
+ EVT_MENU(PU_EXIT, MyTaskBarIcon::OnMenuExit)
+ EVT_MENU(PU_NEW_ICON,MyTaskBarIcon::OnMenuSetNewIcon)
+END_EVENT_TABLE()
+
+void MyTaskBarIcon::OnMenuRestore(wxCommandEvent& )
+{
+ dialog->Show(TRUE);
+}