Mercurial > mercurial > hgweb_iv.cgi
view include/dndfile.h @ 0:3334ef689214 default tip
start develop.
author | pyon@macmini |
---|---|
date | Fri, 14 Aug 2020 03:15:53 +0900 |
parents | |
children |
line wrap: on
line source
// Filename : dndfile.h // Last Change: 2020-08-13 木 12:16:35. // #pragma once class DnDFile : public wxFileDropTarget { public: DnDFile( wxTextCtrl *textCtrl ) { m_textCtrl = textCtrl; } virtual bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames ) { size_t nFiles = filenames.GetCount(); if ( nFiles != 1 ) return false; m_textCtrl->SetValue( filenames[0] ); return true; } private: wxTextCtrl* m_textCtrl; };