- int dialogWidth = 365;
- int dialogHeight = 290;
-
- wxStaticText* stat = new wxStaticText(this, -1, "Press OK to hide me, Exit to quit.",
- wxPoint(10, 20));
-
- wxStaticText* stat2 = new wxStaticText(this, -1, "Double-click on the taskbar icon to show me again.",
- wxPoint(10, 40));
-
- wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(100, 230), wxSize(80, 25));
- wxButton *exitButton = new wxButton(this, wxID_EXIT, "Exit", wxPoint(185, 230), wxSize(80, 25));
- okButton->SetDefault();
- this->Centre(wxBOTH);
+ (void)new wxStaticText(this, wxID_ANY, _T("Press 'Hide me' to hide me, Exit to quit."),
+ wxPoint(10, 20));
+
+ (void)new wxStaticText(this, wxID_ANY, _T("Double-click on the taskbar icon to show me again."),
+ wxPoint(10, 40));
+
+ (void)new wxButton(this, wxID_EXIT, _T("Exit"), wxPoint(185, 230), wxSize(80, 25));
+ (new wxButton(this, wxID_OK, _T("Hide me"), wxPoint(100, 230), wxSize(80, 25)))->SetDefault();
+ Centre(wxBOTH);
+
+ m_taskBarIcon = new MyTaskBarIcon();
+#if defined(__WXCOCOA__)
+ m_dockIcon = new MyTaskBarIcon(wxTaskBarIcon::DOCK);
+#endif
+ if (!m_taskBarIcon->SetIcon(wxICON(sample), wxT("wxTaskBarIcon Sample")))
+ wxMessageBox(wxT("Could not set icon."));