// the application icon (under Windows and OS/2 it is in resources)
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
- #include "mondrian.xpm"
+ #include "../sample.xpm"
#endif
#include "wx/taskbar.h"
bool MyApp::OnInit(void)
{
- if (!m_taskBarIcon.SetIcon(wxICON(mondrian), wxT("wxTaskBarIcon Sample")))
- wxMessageBox(wxT("Could not set icon."));
-
// Create the main frame window
dialog = new MyDialog(NULL, -1, wxT("wxTaskBarIcon Test Dialog"), wxPoint(-1, -1), wxSize(365, 290), wxDIALOG_MODELESS|wxDEFAULT_DIALOG_STYLE);
Init();
}
+MyDialog::~MyDialog()
+{
+ delete m_taskBarIcon;
+}
+
void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event))
{
Show(FALSE);
(void)new wxButton(this, wxID_EXIT, _T("Exit"), wxPoint(185, 230), wxSize(80, 25));
(new wxButton(this, wxID_OK, _T("OK"), wxPoint(100, 230), wxSize(80, 25)))->SetDefault();
Centre(wxBOTH);
+
+
+ m_taskBarIcon = new MyTaskBarIcon();
+ if (!m_taskBarIcon->SetIcon(wxICON(sample), wxT("wxTaskBarIcon Sample")))
+ wxMessageBox(wxT("Could not set icon."));
}