# endif
#endif /* !defined(wxUSE_OLE_AUTOMATION) */
+#ifndef wxUSE_TASKBARICON_BALLOONS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TASKBARICON_BALLOONS must be defined."
+# else
+# define wxUSE_TASKBARICON_BALLOONS 0
+# endif
+#endif /* wxUSE_TASKBARICON_BALLOONS */
+
#ifndef wxUSE_UNICODE_MSLU
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UNICODE_MSLU must be defined."
# endif
#endif
+/*
+ * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test
+ * logic.
+ */
+#if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \
+ (!defined(WINVER) || WINVER < 0x0500)
+# undef wxUSE_TASKBARICON_BALLOONS
+# define wxUSE_TASKBARICON_BALLOONS 0
+#endif
+
/*
* All of the settings below require SEH support (__try/__catch) and can't work
* without it.
// Recommended setting: 1, set to 0 for a small library size reduction
#define wxUSE_OWNER_DRAWN 1
+// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It
+// is required by native wxNotificationMessage implementation.
+//
+// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain
+// the necessary declarations.
+//
+// Recommended setting: 1, set to 0 for a tiny library size reduction
+#define wxUSE_TASKBARICON_BALLOONS 1
+
// Set to 1 to compile MS Windows XP theme engine support
#define wxUSE_UXTHEME 1
//
// Recommended setting: 1, set to 0 if your programs never crash
#define wxUSE_CRASHREPORT 1
-
-// ----------------------------------------------------------------------------
-// obsolete settings
-// ----------------------------------------------------------------------------
-
-// NB: all settings in this section are obsolete and should not be used/changed
-// at all, they will disappear
-
-// Define 1 to use bitmap messages.
-#define wxUSE_BITMAP_MESSAGE 1
-
/* --- end MSW options --- */
#endif // _WX_SETUP_H_
// Recommended setting: 1, set to 0 for a small library size reduction
#define wxUSE_OWNER_DRAWN 1
+// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It
+// is required by native wxNotificationMessage implementation.
+//
+// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain
+// the necessary declarations.
+//
+// Recommended setting: 1, set to 0 for a tiny library size reduction
+#define wxUSE_TASKBARICON_BALLOONS 1
+
// Set to 1 to compile MS Windows XP theme engine support
#define wxUSE_UXTHEME 1
// MSW-specific class methods
+#if wxUSE_TASKBARICON_BALLOONS
// show a balloon notification (the icon must have been already initialized
// using SetIcon)
//
const wxString& text,
unsigned msec = 0,
int flags = 0);
+#endif // wxUSE_TASKBARICON_BALLOONS
protected:
friend class wxTaskBarIconWindow;
- libnotify (Gnome)
- Growl (http://growl.info/, OS X)
*/
-#elif defined(__WXMSW__) && wxUSE_TASKBARICON
+#elif defined(__WXMSW__) && wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS
#include "wx/msw/notifmsg.h"
#else
#include "wx/generic/notifmsg.h"
return ok;
}
+#if wxUSE_TASKBARICON_BALLOONS
+
bool
wxTaskBarIcon::ShowBalloon(const wxString& title,
const wxString& text,
// the balloon disappearance
NotifyIconData notifyData(hwnd);
notifyData.uFlags = 0;
-#if (WINVER >= 0x0500)
notifyData.uVersion = 3 /* NOTIFYICON_VERSION for Windows XP */;
-#endif
wxShellNotifyIcon(NIM_SETVERSION, ¬ifyData);
// do show the balloon now
notifyData = NotifyIconData(hwnd);
notifyData.uFlags |= NIF_INFO;
-#if (WINVER >= 0x0500)
notifyData.uTimeout = msec;
wxStrncpy(notifyData.szInfo, text.wx_str(), WXSIZEOF(notifyData.szInfo));
wxStrncpy(notifyData.szInfoTitle, title.wx_str(),
notifyData.dwInfoFlags |= NIIF_WARNING;
else if ( flags & wxICON_ERROR )
notifyData.dwInfoFlags |= NIIF_ERROR;
-#endif
return wxShellNotifyIcon(NIM_MODIFY, ¬ifyData) != 0;
}
+#endif // wxUSE_TASKBARICON_BALLOONS
+
bool wxTaskBarIcon::RemoveIcon()
{
if (!m_iconAdded)