#include "wx/msw/private.h" // includes <windows.h>
-#if wxUSE_NORLANDER_HEADERS
+// for some compilers, the entire ole2.h must be included, not only oleauto.h
+#if wxUSE_NORLANDER_HEADERS || defined(__WATCOMC__)
#include <ole2.h>
#endif
-#include <oleauto.h>
-
-#ifndef __WIN32__
- #include <ole2.h>
- #include <olestd.h>
-#endif
+#include <oleauto.h>
#include <shlobj.h>
#include "wx/msw/ole/oleutils.h"
CLIPFORMAT *m_formats; // formats we can provide data in
ULONG m_nCount, // number of formats we support
m_nCurrent; // current enum position
+
+ DECLARE_NO_COPY_CLASS(wxIEnumFORMATETC)
};
// ----------------------------------------------------------------------------
wxDataObject *m_pDataObject; // pointer to C++ class we belong to
bool m_mustDelete;
+
+ DECLARE_NO_COPY_CLASS(wxIDataObject)
};
// ============================================================================
wxIEnumFORMATETC::wxIEnumFORMATETC(const wxDataFormat *formats, ULONG nCount)
{
- m_cRef = 0;
m_nCurrent = 0;
m_nCount = nCount;
m_formats = new CLIPFORMAT[nCount];
wxIDataObject::wxIDataObject(wxDataObject *pDataObject)
{
- m_cRef = 0;
m_pDataObject = pDataObject;
m_mustDelete = FALSE;
}
|| ( defined(__MWERKS__) && defined(__WXMSW__) )
size = std::wcslen((const wchar_t *)pBuf) * sizeof(wchar_t);
#else
- size = ::wcslen((const wchar_t *)pBuf) * sizeof(wchar_t);
+ size = wxWcslen((const wchar_t *)pBuf) * sizeof(wchar_t);
#endif
break;
#endif
// the only one allowed by current COM implementation
if ( pformatetc->lindex != -1 ) {
wxLogTrace(wxTRACE_OleCalls,
- wxT("wxIDataObject::QueryGetData: bad lindex %d"),
+ wxT("wxIDataObject::QueryGetData: bad lindex %ld"),
pformatetc->lindex);
return DV_E_LINDEX;
// we don't support anything other (THUMBNAIL, ICON, DOCPRINT...)
if ( pformatetc->dwAspect != DVASPECT_CONTENT ) {
wxLogTrace(wxTRACE_OleCalls,
- wxT("wxIDataObject::QueryGetData: bad dwAspect %d"),
+ wxT("wxIDataObject::QueryGetData: bad dwAspect %ld"),
pformatetc->dwAspect);
return DV_E_DVASPECT;
// wxURLDataObject
// ----------------------------------------------------------------------------
-
class CFSTR_SHELLURLDataObject : public wxCustomDataObject
{
public:
// CFSTR_SHELLURL is _always_ ANSI!
wxCharBuffer char_buffer( GetDataSize() );
wxCustomDataObject::GetDataHere( (void*)char_buffer.data() );
- wxString unicode_buffer( char_buffer );
+ wxString unicode_buffer( char_buffer, wxConvLibc );
memcpy( buffer, unicode_buffer.c_str(),
( unicode_buffer.length() + 1 ) * sizeof(wxChar) );