X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd3a2da9573f270564cd035e0cfbf6902cf8750..0b7e6e7da208b6a95fb23cb50286a09dc90d96d2:/src/msw/dde.cpp diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index 0d084650d7..73fa7d6955 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -37,6 +37,8 @@ #include "wx/module.h" #include "wx/dde.h" +#include "wx/intl.h" + #include "wx/msw/private.h" @@ -48,6 +50,24 @@ #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"));