X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a0e6a5bafe2efb3466b1527eb7eb670aaa5e634..5e3e62bc6e77477573d3c6b36b71e96d2601a27c:/src/msw/ole/dropsrc.cpp diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index e9f543c59b..9118eecef8 100644 --- a/src/msw/ole/dropsrc.cpp +++ b/src/msw/ole/dropsrc.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/ole/dropsrc.cpp +// Name: src/msw/ole/dropsrc.cpp // Purpose: implementation of wxIDropSource and wxDropSource // Author: Vadim Zeitlin // Modified by: @@ -17,25 +17,20 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #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" +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/log.h" +#endif + #include "wx/dnd.h" #include "wx/msw/private.h" @@ -57,18 +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) + wxDECLARE_NO_COPY_CLASS(wxIDropSource); }; // ============================================================================ @@ -237,7 +233,7 @@ 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()); @@ -249,4 +245,4 @@ bool wxDropSource::GiveFeedback(wxDragResult effect) } } -#endif //USE_DRAG_AND_DROP +#endif // wxUSE_OLE && wxUSE_DRAG_AND_DROP