X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2245b2b2c3339ecf023e5880caa803610a5d1907..d53f610c1c224b6a0f58e4009b2bce553b1ff7b9:/src/msw/ole/dropsrc.cpp diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index 6aae42c5d5..90f89d419e 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 + + DECLARE_NO_COPY_CLASS(wxIDropSource) }; // ============================================================================ @@ -93,7 +87,6 @@ wxIDropSource::wxIDropSource(wxDropSource *pDropSource) m_pDropSource = pDropSource; m_grfInitKeyState = 0; - m_cRef = 0; } // Name : wxIDropSource::QueryContinueDrag @@ -244,12 +237,12 @@ bool wxDropSource::GiveFeedback(wxDragResult effect) { ::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