--- /dev/null
+/* XPM */
+static char * smile_xpm[] = {
+"24 24 22 1",
+" c None",
+". c #404000",
+"+ c #333300",
+"@ c #7F7F00",
+"# c #FFFF00",
+"$ c #000000",
+"% c #CFCF00",
+"& c #9F9F00",
+"* c #DFDF00",
+"= c #303000",
+"- c #808000",
+"; c #BFBF00",
+"> c #202000",
+", c #707000",
+"' c #606000",
+") c #EFEF00",
+"! c #9F1000",
+"~ c #603000",
+"{ c #DF0000",
+"] c #FF0000",
+"^ c #804000",
+"/ c #800000",
+" ...... ",
+" +@@######@@+ ",
+" $%##########%$ ",
+" &##############& ",
+" &################& ",
+" $##################$ ",
+" +%####*==*##*==*####%+ ",
+" -#####-$$-##-$$-#####- ",
+" -#####-$$-##-$$-#####- ",
+".######-$$-##-$$-######.",
+".######;>>;##;>>;######.",
+".#####,#%%####%%#,#####.",
+".####%,##########,%####.",
+".##-->############>--##.",
+".##;;;,##########,;;;##.",
+" -####;')######)';####- ",
+" -####*.'&####&'.*####- ",
+" +%####*=!....!=*####%+ ",
+" $######~{]]{~######$ ",
+" &#####*^//^*#####& ",
+" &#####*;;*#####& ",
+" $%##########%$ ",
+" +--######--+ ",
+" ...... "};
#include "../sample.xpm"
#endif
+#include "smile.xpm"
+
#include "wx/taskbar.h"
#include "tbtest.h"
(new wxButton(this, wxID_OK, _T("Hide me"), 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."));
void MyTaskBarIcon::OnMenuSetNewIcon(wxCommandEvent&)
{
-#ifdef __WXMSW__
- wxIcon icon(wxT("wxDEFAULT_FRAME"));
+ wxIcon icon(smile_xpm);
- if (!SetIcon(icon, wxT("wxTaskBarIcon Sample")))
+ if (!SetIcon(icon, wxT("wxTaskBarIcon Sample - a different icon")))
wxMessageBox(wxT("Could not set new icon."));
-#endif
}
// Overridables
wxMenu menu;
menu.Append(PU_RESTORE, _T("&Restore TBTest"));
-#ifdef __WXMSW__
menu.Append(PU_NEW_ICON,_T("&Set New Icon"));
-#endif
menu.Append(PU_EXIT, _T("E&xit"));
PopupMenu(&menu);
{
dialog->Show(true);
}
-
-
-
-