]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dde.cpp
Fix to MDI to restore 3D border; kludge to OGL Studio sample to redraw
[wxWidgets.git] / src / msw / dde.cpp
index 0d084650d7322d82d4a3bac66921ccb6da12cc3b..73fa7d695520b614f695e93b3cc5db540a706851 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "wx/module.h"
 #include "wx/dde.h"
+#include "wx/intl.h"
+
 
 #include "wx/msw/private.h"
 
     #include "wx/msw/gnuwin32/extra.h"
 #endif
 
+// some compilers headers don't define this one (mingw32)
+#ifndef DMLERR_NO_ERROR
+    #define DMLERR_NO_ERROR (0)
+
+    // this one is also missing from some mingw32 headers, but there is no way
+    // to test for it (I know of) - the test for DMLERR_NO_ERROR works for me,
+    // but is surely not the right thing to do
+    extern "C"
+    HDDEDATA STDCALL DdeClientTransaction(LPBYTE pData,
+                                          DWORD cbData,
+                                          HCONV hConv,
+                                          HSZ hszItem,
+                                          UINT wFmt,
+                                          UINT wType,
+                                          DWORD dwTimeout,
+                                          LPDWORD pdwResult);
+#endif // no DMLERR_NO_ERROR
+
 // ----------------------------------------------------------------------------
 // macros and constants
 // ----------------------------------------------------------------------------
@@ -898,7 +918,7 @@ static HSZ DDEAtomFromString(const wxString& s)
 {
     wxASSERT_MSG( DDEIdInst, _T("DDE not initialized") );
 
-    HSZ hsz = DdeCreateStringHandle(DDEIdInst, s, DDE_CP);
+    HSZ hsz = DdeCreateStringHandle(DDEIdInst, (char*) s.c_str(), DDE_CP);
     if ( !hsz )
     {
         DDELogError(_("Failed to create DDE string"));