X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f00347ae385c0d7a9baabd55ed969e23364dba0..57bf907d8e45ced18486d74c04f41c06034b7e65:/samples/taskbar/tbtest.cpp?ds=sidebyside diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index 397a438fc2..9256009cdd 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -60,6 +60,16 @@ bool MyApp::OnInit() if ( !wxApp::OnInit() ) return false; + if ( !wxTaskBarIcon::IsAvailable() ) + { + wxMessageBox + ( + "There appears to be no system tray support in your current environment. This sample may not behave as expected.", + "Warning", + wxOK | wxICON_EXCLAMATION + ); + } + // Create the main window gs_dialog = new MyDialog(wxT("wxTaskBarIcon Test Dialog")); @@ -151,7 +161,7 @@ void MyDialog::OnAbout(wxCommandEvent& WXUNUSED(event)) #if defined(__WXMSW__) && wxUSE_TASKBARICON_BALLOONS m_taskBarIcon->ShowBalloon(title, message, 15000, wxICON_INFORMATION); #else // !__WXMSW__ - wxMessageBox(message, title, wxICON_INFORMATION, this); + wxMessageBox(message, title, wxICON_INFORMATION|wxOK, this); #endif // __WXMSW__/!__WXMSW__ }