X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82df67d960355e99a66b1db473b9d6236bf2fbb9..43f4e852a1b2ac37c3db6a2b87315192ac549191:/src/msw/ole/dropsrc.cpp diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index 8f0ab7e6f4..9118eecef8 100644 --- a/src/msw/ole/dropsrc.cpp +++ b/src/msw/ole/dropsrc.cpp @@ -1,12 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/ole/dropsrc.cpp +// Name: src/msw/ole/dropsrc.cpp // Purpose: implementation of wxIDropSource and wxDropSource // Author: Vadim Zeitlin // Modified by: // Created: 10.05.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -17,36 +17,27 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "dropsrc.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #if defined(__BORLANDC__) #pragma hdrstop #endif -#ifndef WX_PRECOMP -#include "wx/window.h" -#endif - -#include "wx/setup.h" #if wxUSE_OLE && wxUSE_DRAG_AND_DROP -#include "wx/log.h" -#include "wx/dnd.h" +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/log.h" +#endif -#include +#include "wx/dnd.h" -#if wxUSE_NORLANDER_HEADERS - #include -#endif +#include "wx/msw/private.h" -#ifndef __WIN32__ +// for some compilers, the entire ole2.h must be included, not only oleauto.h +#if wxUSE_NORLANDER_HEADERS || defined(__WATCOMC__) || defined(__WXWINCE__) #include - #include #endif #include @@ -61,16 +52,19 @@ class wxIDropSource : public IDropSource { public: wxIDropSource(wxDropSource *pDropSource); - - DECLARE_IUNKNOWN_METHODS; + virtual ~wxIDropSource() { } // IDropSource STDMETHODIMP QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState); STDMETHODIMP GiveFeedback(DWORD dwEffect); + DECLARE_IUNKNOWN_METHODS; + private: DWORD m_grfInitKeyState; // button which started the d&d operation wxDropSource *m_pDropSource; // pointer to C++ class we belong to + + wxDECLARE_NO_COPY_CLASS(wxIDropSource); }; // ============================================================================ @@ -239,16 +233,16 @@ wxDragResult wxDropSource::DoDragDrop(int flags) bool wxDropSource::GiveFeedback(wxDragResult effect) { const wxCursor& cursor = GetCursor(effect); - if ( cursor.Ok() ) + if ( cursor.IsOk() ) { ::SetCursor((HCURSOR)cursor.GetHCURSOR()); - return TRUE; + return true; } else { - return FALSE; + return false; } } -#endif //USE_DRAG_AND_DROP +#endif // wxUSE_OLE && wxUSE_DRAG_AND_DROP