]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/taskbar/tbtest.cpp
clarify role of wxToolBarToolBase (fixes #9874)
[wxWidgets.git] / samples / taskbar / tbtest.cpp
index 54f2e79215bd44abe4b5aa0c01a788cfba6c148b..9723e48ae0e094cf34d5f3171d5cfd08c8b2525e 100644 (file)
@@ -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"));
 
@@ -148,7 +158,7 @@ void MyDialog::OnAbout(wxCommandEvent& WXUNUSED(event))
           "(C) 1997 Julian Smart\n"
           "(C) 2007 Vadim Zeitlin";
 
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && wxUSE_TASKBARICON_BALLOONS
     m_taskBarIcon->ShowBalloon(title, message, 15000, wxICON_INFORMATION);
 #else // !__WXMSW__
     wxMessageBox(message, title, wxICON_INFORMATION, this);