]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/dataobj.cpp
There was no icon file in this example, causing compilation with VC to fail. I just...
[wxWidgets.git] / src / msw / ole / dataobj.cpp
index 950f343536984842cd344528bda923cb96812fd6..b2521b71436a4410dd23f025102a90aeb6fa9c0d 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "wx/msw/private.h"         // includes <windows.h>
 
-#ifdef wxUSE_NORLANDER_HEADERS
+#if wxUSE_NORLANDER_HEADERS
   #include <ole2.h>
 #endif
 #include <oleauto.h>
@@ -506,6 +506,10 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
                             size_t *p = (size_t *)pBuf;
                             size = *p++;
                             pBuf = p;
+                            if (! format.IsStandard() ) {
+                                // see GetData for coresponding increment
+                                size -= sizeof(size_t);
+                            }
                         }
                 }