X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b64f0a5fc7bbe365bcd1b38c346a4033761f49ed..606b005fb2b535b34d1ca45d2d06ee86718e8b1c:/src/msw/ole/droptgt.cpp?ds=sidebyside diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 158b8bd3da..57d4cb04e8 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -36,6 +36,9 @@ #ifdef __WIN32__ #if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS + #if wxCHECK_W32API_VERSION( 1, 0 ) + #include + #endif #include // for DROPFILES structure #endif #else @@ -61,11 +64,7 @@ class wxIDropTarget : public IDropTarget { public: wxIDropTarget(wxDropTarget *p); - // suppress gcc warning -#ifdef __GNUG__ - virtual -#endif - ~wxIDropTarget(); + virtual ~wxIDropTarget(); // accessors for wxDropTarget void SetHwnd(HWND hwnd) { m_hwnd = hwnd; } @@ -309,7 +308,7 @@ bool wxDropTarget::Register(WXHWND hwnd) { HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE); if ( FAILED(hr) ) { - wxLogApiError("CoLockObjectExternal", hr); + wxLogApiError(wxT("CoLockObjectExternal"), hr); return FALSE; } @@ -317,7 +316,7 @@ bool wxDropTarget::Register(WXHWND hwnd) if ( FAILED(hr) ) { ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE); - wxLogApiError("RegisterDragDrop", hr); + wxLogApiError(wxT("RegisterDragDrop"), hr); return FALSE; } @@ -332,7 +331,7 @@ void wxDropTarget::Revoke(WXHWND hwnd) HRESULT hr = ::RevokeDragDrop((HWND) hwnd); if ( FAILED(hr) ) { - wxLogApiError("RevokeDragDrop", hr); + wxLogApiError(wxT("RevokeDragDrop"), hr); } ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE); @@ -425,7 +424,8 @@ wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const // get the list of supported formats size_t nFormats = m_dataObject->GetFormatCount(wxDataObject::Set); - wxDataFormat format, *formats; + wxDataFormat format; + wxDataFormat *formats; formats = nFormats == 1 ? &format : new wxDataFormat[nFormats]; m_dataObject->GetAllFormats(formats, wxDataObject::Set);