]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notifmsg.cpp
DC headers don't need to be in gtk/private.h
[wxWidgets.git] / src / msw / notifmsg.cpp
index dbbc098ad2ce5ecd3494d5278ebfdb914d73edbe..f5064e68a2f93efd2c9694b1b97fd87f5ed5aea0 100644 (file)
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-#if wxUSE_NOTIFICATION_MESSAGE && wxUSE_TASKBARICON
+// we can only use the native implementation if we have a working
+// wxTaskBarIcon::ShowBalloon() method
+#if wxUSE_NOTIFICATION_MESSAGE && \
+        wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS
+
+#include "wx/notifmsg.h"
 
 #ifndef WX_PRECOMP
 
 #ifndef WX_PRECOMP
+    #include "wx/toplevel.h"
+    #include "wx/app.h"
     #include "wx/string.h"
 #endif // WX_PRECOMP
 
     #include "wx/string.h"
 #endif // WX_PRECOMP
 
-#include "wx/notifmsg.h"
 #include "wx/generic/notifmsg.h"
 
 #include "wx/taskbar.h"
 #include "wx/generic/notifmsg.h"
 
 #include "wx/taskbar.h"
@@ -377,6 +383,9 @@ wxAutoNotifMsgImpl::DoShow(const wxString& title,
 // wxNotificationMessage
 // ----------------------------------------------------------------------------
 
 // wxNotificationMessage
 // ----------------------------------------------------------------------------
 
+/* static */
+bool wxNotificationMessage::ms_alwaysUseGeneric = false;
+
 /* static */
 wxTaskBarIcon *wxNotificationMessage::UseTaskBarIcon(wxTaskBarIcon *icon)
 {
 /* static */
 wxTaskBarIcon *wxNotificationMessage::UseTaskBarIcon(wxTaskBarIcon *icon)
 {
@@ -387,7 +396,7 @@ bool wxNotificationMessage::Show(int timeout)
 {
     if ( !m_impl )
     {
 {
     if ( !m_impl )
     {
-        if ( wxTheApp->GetShell32Version() >= 500 )
+        if ( !ms_alwaysUseGeneric && wxTheApp->GetShell32Version() >= 500 )
         {
             if ( timeout == Timeout_Never )
                 m_impl = new wxManualNotifMsgImpl(GetParent());
         {
             if ( timeout == Timeout_Never )
                 m_impl = new wxManualNotifMsgImpl(GetParent());