]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/dataobj.cpp
don't try to paint hidden windows
[wxWidgets.git] / src / msw / ole / dataobj.cpp
index 70667b9e07b11a79981fcf01e9c246f0cae8d85e..50eea047b9c0977927428151142bdae956873f66 100644 (file)
@@ -686,7 +686,10 @@ size_t wxDataObject::GetBufferOffset(const wxDataFormat& format )
 const void* wxDataObject::GetSizeFromBuffer( const void* buffer, size_t* size,
                                                const wxDataFormat& format )
 {
 const void* wxDataObject::GetSizeFromBuffer( const void* buffer, size_t* size,
                                                const wxDataFormat& format )
 {
-    size_t realsz = ::HeapSize(::GetProcessHeap(), 0, buffer);
+    // hack: the third parameter is declared non-const in Wine's headers so
+    // cast away the const
+    size_t realsz = ::HeapSize(::GetProcessHeap(), 0,
+                               wx_const_cast(void*, buffer));
     if ( realsz == (size_t)-1 )
     {
         // note that HeapSize() does not set last error
     if ( realsz == (size_t)-1 )
     {
         // note that HeapSize() does not set last error