]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/dataobj.cpp
fixed wxToolBar::DeleteTool and losing the rows number on sys colour change
[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);
+                            }
                         }
                 }