DnD sample compiles and works

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-05-10 09:18:12 +00:00
parent cc2b747254
commit 9931f08ade

View File

@@ -9,20 +9,20 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include <wx/wxprec.h>
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include <wx/wx.h>
#endif #endif
#include "wx/intl.h" #include <wx/intl.h>
#include "wx/log.h" #include <wx/log.h>
#include "wx/dnd.h" #include <wx/dnd.h>
#ifdef __WXMOTIF__ #ifdef __WXMOTIF__
#error Sorry, drag and drop is not yet implemented on wxMotif. #error Sorry, drag and drop is not yet implemented on wxMotif.
@@ -42,7 +42,7 @@ class DnDText : public wxTextDropTarget
public: public:
DnDText(wxListBox *pOwner) { m_pOwner = pOwner; } DnDText(wxListBox *pOwner) { m_pOwner = pOwner; }
virtual bool OnDropText(int x, int y, const wxChar* psz ); virtual bool OnDropText(long x, long y, const wxChar* psz );
private: private:
wxListBox *m_pOwner; wxListBox *m_pOwner;
@@ -53,7 +53,7 @@ class DnDFile : public wxFileDropTarget
public: public:
DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; } DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; }
virtual bool OnDropFiles(int x, int y, virtual bool OnDropFiles(long x, long y,
size_t nFiles, const wxChar* const aszFiles[] ); size_t nFiles, const wxChar* const aszFiles[] );
private: private:
@@ -349,14 +349,14 @@ DnDFrame::~DnDFrame()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Notifications called by the base class // Notifications called by the base class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
bool DnDText::OnDropText( int, int, const wxChar *psz ) bool DnDText::OnDropText( long, long, const wxChar *psz )
{ {
m_pOwner->Append(psz); m_pOwner->Append(psz);
return TRUE; return TRUE;
} }
bool DnDFile::OnDropFiles( int, int, size_t nFiles, bool DnDFile::OnDropFiles( long, long, size_t nFiles,
const wxChar* const aszFiles[]) const wxChar* const aszFiles[])
{ {
wxString str; wxString str;