+ wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);
+
+ wxSizerFlags flags;
+ flags.Border(wxALL, 10);
+
+ sizerTop->Add(new wxStaticText
+ (
+ this,
+ wxID_ANY,
+ _T("Press 'Hide me' to hide this window, Exit to quit.")
+ ), flags);
+
+ sizerTop->Add(new wxStaticText
+ (
+ this,
+ wxID_ANY,
+ _T("Double-click on the taskbar icon to show me again.")
+ ), flags);
+
+ sizerTop->AddStretchSpacer()->SetMinSize(200, 50);
+
+ wxSizer * const sizerBtns = new wxBoxSizer(wxHORIZONTAL);
+ sizerBtns->Add(new wxButton(this, wxID_ABOUT, _T("&About")), flags);
+ sizerBtns->Add(new wxButton(this, wxID_OK, _T("&Hide")), flags);
+ sizerBtns->Add(new wxButton(this, wxID_EXIT, _T("E&xit")), flags);
+
+ sizerTop->Add(sizerBtns, flags.Align(wxALIGN_CENTER_HORIZONTAL));
+ SetSizerAndFit(sizerTop);
+ Centre();
+
+ m_taskBarIcon = new MyTaskBarIcon();
+#if defined(__WXCOCOA__)
+ m_dockIcon = new MyTaskBarIcon(wxTaskBarIcon::DOCK);
+#endif
+
+ // we should be able to show up to 128 characters on recent Windows versions
+ // (and 64 on Win9x)
+ if ( !m_taskBarIcon->SetIcon(wxICON(sample),
+ "wxTaskBarIcon Sample\n"
+ "With a very, very, very, very\n"
+ "long tooltip whose length is\n"
+ "greater than 64 characters.") )
+ {
+ wxLogError(wxT("Could not set icon."));
+ }