]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dde.cpp
Some change logs
[wxWidgets.git] / src / msw / dde.cpp
index ff1128509691555ad9fda2721018bbe365329d53..475b580110dac8ae0b8ffcdb48beaa67d649bd42 100644 (file)
 #include "wx/dde.h"
 #include "wx/intl.h"
 #include "wx/hashmap.h"
+#include "wx/math.h"
 
 #include "wx/msw/private.h"
 
 #include <string.h>
 #include <ddeml.h>
-#include <math.h>
 
 // ----------------------------------------------------------------------------
 // macros and constants
@@ -595,7 +595,7 @@ wxChar *wxDDEConnection::Request(const wxString& item, int *size, wxIPCFormat fo
     }
 
     DWORD len = DdeGetData(returned_data, NULL, 0, 0);
-    len = ceil( static_cast<double>(len)/sizeof(wxChar) );
+    len = (DWORD)ceil( double(len)/sizeof(wxChar) );
 
     wxChar *data = GetBufferAtLeast( len );
     wxASSERT_MSG(data != NULL,
@@ -777,7 +777,7 @@ _DDECallback(WORD wType,
                 if (connection)
                 {
                     DWORD len = DdeGetData(hData, NULL, 0, 0);
-                    len = ceil( static_cast<double>(len)/sizeof(wxChar) );
+                    len = (DWORD)ceil( double(len)/sizeof(wxChar) );
 
                     wxChar *data = connection->GetBufferAtLeast( len );
                     wxASSERT_MSG(data != NULL,
@@ -839,7 +839,7 @@ _DDECallback(WORD wType,
                     wxString item_name = DDEStringFromAtom(hsz2);
 
                     DWORD len = DdeGetData(hData, NULL, 0, 0);
-                    len = ceil( static_cast<double>(len) / sizeof(wxChar) );
+                    len = (DWORD)ceil( double(len) / sizeof(wxChar) );
 
                     wxChar *data = connection->GetBufferAtLeast( len );
                     wxASSERT_MSG(data != NULL,
@@ -927,7 +927,7 @@ _DDECallback(WORD wType,
                     wxString item_name = DDEStringFromAtom(hsz2);
 
                     DWORD len = DdeGetData(hData, NULL, 0, 0);
-                    len = ceil( static_cast<double>(len) / sizeof(wxChar) );
+                    len = (DWORD)ceil( double(len) / sizeof(wxChar) );
 
                     wxChar *data = connection->GetBufferAtLeast( len );
                     wxASSERT_MSG(data != NULL,