X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/403750325d372829ea8162462cc1cd8a92368ac4..777469ca936965a1ed15f70f3fe81f665833bf6a:/src/msw/ole/droptgt.cpp diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 1c68f26e4a..182ae4e3d0 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: -// RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -50,6 +49,32 @@ #include "wx/msw/ole/oleutils.h" +#include + +// Some (very) old SDKs don't define IDropTargetHelper, so define our own +// version of it here. +struct wxIDropTargetHelper : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE DragEnter(HWND hwndTarget, + IDataObject *pDataObject, + POINT *ppt, + DWORD dwEffect) = 0; + virtual HRESULT STDMETHODCALLTYPE DragLeave() = 0; + virtual HRESULT STDMETHODCALLTYPE DragOver(POINT *ppt, DWORD dwEffect) = 0; + virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObject, + POINT *ppt, + DWORD dwEffect) = 0; + virtual HRESULT STDMETHODCALLTYPE Show(BOOL fShow) = 0; +}; + +namespace +{ + DEFINE_GUID(wxCLSID_DragDropHelper, + 0x4657278A,0x411B,0x11D2,0x83,0x9A,0x00,0xC0,0x4F,0xD9,0x18,0xD0); + DEFINE_GUID(wxIID_IDropTargetHelper, + 0x4657278B,0x411B,0x11D2,0x83,0x9A,0x00,0xC0,0x4F,0xD9,0x18,0xD0); +} + // ---------------------------------------------------------------------------- // IDropTarget interface: forward all interesting things to wxDropTarget // (the name is unfortunate, but wx_I_DropTarget is not at all the same thing @@ -580,8 +605,8 @@ void wxDropTarget::MSWInitDragImageSupport() { // Use the default drop target helper to show shell drag images - CoCreateInstance(CLSID_DragDropHelper, NULL, CLSCTX_INPROC_SERVER, - IID_IDropTargetHelper, (LPVOID*)&m_dropTargetHelper); + CoCreateInstance(wxCLSID_DragDropHelper, NULL, CLSCTX_INPROC_SERVER, + wxIID_IDropTargetHelper, (LPVOID*)&m_dropTargetHelper); } void