#if defined(__BORLANDC__)
#pragma hdrstop
#endif
-
+#ifndef WX_PRECOMP
+#include "wx/intl.h"
+#endif
#include "wx/defs.h"
-#if defined(__WIN32__) && !defined(__GNUWIN32__)
+#if defined(__WIN32__) && !defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include "wx/log.h"
#include "wx/dataobj.h"
#include <windows.h>
+#ifdef wxUSE_NORLANDER_HEADERS
+ #include <ole2.h>
+#endif
#include <oleauto.h>
-#ifndef __WIN32__
+#ifndef __WIN32__
#include <ole2.h>
#include <olestd.h>
#endif
FORMATETC *rgelt,
ULONG *pceltFetched)
{
- wxLogTrace("wxIEnumFORMATETC::Next");
+ wxLogTrace(_T("wxIEnumFORMATETC::Next"));
if ( celt > 1 )
return S_FALSE;
STDMETHODIMP wxIEnumFORMATETC::Skip(ULONG celt)
{
- wxLogTrace("wxIEnumFORMATETC::Skip");
+ wxLogTrace(_T("wxIEnumFORMATETC::Skip"));
if ( m_nCurrent == 0 )
m_nCurrent++;
STDMETHODIMP wxIEnumFORMATETC::Reset()
{
- wxLogTrace("wxIEnumFORMATETC::Reset");
+ wxLogTrace(_T("wxIEnumFORMATETC::Reset"));
m_nCurrent = 0;
STDMETHODIMP wxIEnumFORMATETC::Clone(IEnumFORMATETC **ppenum)
{
- wxLogTrace("wxIEnumFORMATETC::Clone");
+ wxLogTrace(_T("wxIEnumFORMATETC::Clone"));
wxIEnumFORMATETC *pNew = new wxIEnumFORMATETC(m_format.cfFormat);
pNew->AddRef();
// get data functions
STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium)
{
- wxLogTrace("wxIDataObject::GetData");
+ wxLogTrace(_T("wxIDataObject::GetData"));
// is data is in our format?
HRESULT hr = QueryGetData(pformatetcIn);
STDMETHODIMP wxIDataObject::GetDataHere(FORMATETC *pformatetc,
STGMEDIUM *pmedium)
{
- wxLogTrace("wxIDataObject::GetDataHere");
+ wxLogTrace(_T("wxIDataObject::GetDataHere"));
// put data in caller provided medium
if ( pmedium->tymed != TYMED_HGLOBAL )
// copy data
void *pBuf = GlobalLock(pmedium->hGlobal);
if ( pBuf == NULL ) {
- wxLogLastError("GlobalLock");
+ wxLogLastError(_T("GlobalLock"));
return E_OUTOFMEMORY;
}
STGMEDIUM *pmedium,
BOOL fRelease)
{
- wxLogTrace("wxIDataObject::SetData");
+ wxLogTrace(_T("wxIDataObject::SetData"));
return E_NOTIMPL;
}
{
// do we accept data in this format?
if ( pformatetc == NULL ) {
- wxLogTrace("wxIDataObject::QueryGetData: invalid ptr.");
+ wxLogTrace(_T("wxIDataObject::QueryGetData: invalid ptr."));
return E_INVALIDARG;
}
// the only one allowed by current COM implementation
if ( pformatetc->lindex != -1 ) {
- wxLogTrace("wxIDataObject::QueryGetData: bad lindex %d",
+ wxLogTrace(_T("wxIDataObject::QueryGetData: bad lindex %d"),
pformatetc->lindex);
return DV_E_LINDEX;
}
// we don't support anything other (THUMBNAIL, ICON, DOCPRINT...)
if ( pformatetc->dwAspect != DVASPECT_CONTENT ) {
- wxLogTrace("wxIDataObject::QueryGetData: bad dwAspect %d",
+ wxLogTrace(_T("wxIDataObject::QueryGetData: bad dwAspect %d"),
pformatetc->dwAspect);
return DV_E_DVASPECT;
}
// @@ we only transfer data by global memory (bad for large amounts of it!)
if ( !(pformatetc->tymed & TYMED_HGLOBAL) ) {
- wxLogTrace("wxIDataObject::QueryGetData: %s != TYMED_HGLOBAL.",
+ wxLogTrace(_T("wxIDataObject::QueryGetData: %s != TYMED_HGLOBAL."),
GetTymedName(pformatetc->tymed));
return DV_E_TYMED;
}
// and now check the type of data requested
if ( m_pDataObject->IsSupportedFormat((wxDataFormatId)pformatetc->cfFormat) ) {
- wxLogTrace("wxIDataObject::QueryGetData: %s ok",
+ wxLogTrace(_T("wxIDataObject::QueryGetData: %s ok"),
wxDataObject::GetFormatName((wxDataFormatId)pformatetc->cfFormat));
return S_OK;
}
else {
- wxLogTrace("wxIDataObject::QueryGetData: %s unsupported",
+ wxLogTrace(_T("wxIDataObject::QueryGetData: %s unsupported"),
wxDataObject::GetFormatName((wxDataFormatId)pformatetc->cfFormat));
return DV_E_FORMATETC;
}
STDMETHODIMP wxIDataObject::GetCanonicalFormatEtc(FORMATETC *pFormatetcIn,
FORMATETC *pFormatetcOut)
{
- wxLogTrace("wxIDataObject::GetCanonicalFormatEtc");
+ wxLogTrace(_T("wxIDataObject::GetCanonicalFormatEtc"));
// @@ implementation is trivial, we might want something better here
if ( pFormatetcOut != NULL )
STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDirection,
IEnumFORMATETC **ppenumFormatEtc)
{
- wxLogTrace("wxIDataObject::EnumFormatEtc");
+ wxLogTrace(_T("wxIDataObject::EnumFormatEtc"));
if ( dwDirection == DATADIR_SET ) {
// we don't allow setting of data anyhow