Patch #902 2006-03-07 04:41

thenullinator

Windows: DDE Errors When "Tip of the Day" is Enabled
Download
902-Windows_DDE_Err.patch (1.0 KB)
Category
Platform-Specific
Status
Accepted
Close date
2006-03-07 09:13
Assigned to
 
Index: app.cpp
===================================================================
--- app.cpp    (revision 2144)
+++ app.cpp    (working copy)
@@ -160,12 +160,6 @@
 
         }
     }
-
-    if (!m_NoDDE && cfg->ReadBool(_T("/environment/use_dde"), true))
-    {
-        g_DDEServer = new DDEServer(frame);
-        g_DDEServer->Create(DDE_SERVICE);
-    }
 #endif
 }
 
@@ -411,6 +405,18 @@
         HideSplashScreen();
         SetTopWindow(frame);
         frame->Show();
+
+#ifdef __WXMSW__
+        // moved from InitAssociations()
+        // fixes DDE bug when app is started by double clicking a file in Windows Explorer and
+        // the "Tip of the Day" dialog is enabled.
+        if (!m_NoDDE && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/use_dde"), true))
+        {
+            g_DDEServer = new DDEServer(frame);
+            g_DDEServer->Create(DDE_SERVICE);
+        }
+#endif
+
         frame->ShowTips(); // this func checks if the user wants tips, so no need to check here
         InitAssociations(frame);
         return true;