#ifdef __WXDEBUG__
static const wxChar *GetTymedName(DWORD tymed);
#else // !Debug
- #define GetTymedName(tymed) ""
+ #define GetTymedName(tymed) _T("")
#endif // Debug/!Debug
// ----------------------------------------------------------------------------
size_t nFormatCount = m_pDataObject->GetFormatCount(dir);
wxDataFormat format;
- wxDataFormat *formats;
+ wxDataFormat *formats;
formats = nFormatCount == 1 ? &format : new wxDataFormat[nFormatCount];
m_pDataObject->GetAllFormats(formats, dir);
*pbuf++ = wxT('\0');
}
- *pbuf = wxT('\0'); // add final null terminator
+ // add final null terminator
+ *pbuf = wxT('\0');
return TRUE;
}
POINTL pt,
DWORD *pdwEffect)
{
- wxLogDebug(wxT("IDropTarget::DragEnter"));
+ wxLogTrace(wxTRACE_OleCalls, wxT("IDropTarget::DragEnter"));
- wxASSERT( m_pIDataObject == NULL );
+ wxASSERT_MSG( m_pIDataObject == NULL,
+ _T("drop target must have data object") );
+
+ // show the list of formats supported by the source data object for the
+ // debugging purposes
+#if 0
+ IEnumFORMATETC *penumFmt;
+ if ( SUCCEEDED(pIDataSource->EnumFormatEtc(DATADIR_GET, &penumFmt)) )
+ {
+ FORMATETC fmt;
+ while ( penumFmt->Next(1, &fmt, NULL) == S_OK )
+ {
+ wxLogDebug(_T("Drop source supports format %s"),
+ wxDataObject::GetFormatName(fmt.cfFormat));
+ }
+
+ penumFmt->Release();
+ }
+ else
+ {
+ wxLogLastError(_T("IDataObject::EnumFormatEtc"));
+ }
+#endif // 0
if ( !m_pTarget->IsAcceptedData(pIDataSource) ) {
// we don't accept this kind of data
// Notes : good place to do any clean-up
STDMETHODIMP wxIDropTarget::DragLeave()
{
- wxLogDebug(wxT("IDropTarget::DragLeave"));
+ wxLogTrace(wxTRACE_OleCalls, wxT("IDropTarget::DragLeave"));
// remove the UI feedback
m_pTarget->OnLeave();
POINTL pt,
DWORD *pdwEffect)
{
- wxLogDebug(wxT("IDropTarget::Drop"));
+ wxLogTrace(wxTRACE_OleCalls, wxT("IDropTarget::Drop"));
// TODO I don't know why there is this parameter, but so far I assume
// that it's the same we've already got in DragEnter
// get the list of supported formats
size_t nFormats = m_dataObject->GetFormatCount(wxDataObject::Set);
wxDataFormat format;
- wxDataFormat *formats;
+ wxDataFormat *formats;
formats = nFormats == 1 ? &format : new wxDataFormat[nFormats];
m_dataObject->GetAllFormats(formats, wxDataObject::Set);