Re: How to accept drag-drop files from SVN
There are more than one way of doing this.
One is to have a COleDropTarget and register your window with it.
To do this I normally use multiple-inheritance:
class CMyDialog : public CDialog, public COleDropTarget
And in the OnInitDialog method call register, then you can also handel the
COleDropTarget events in the same class.
This gives you compete control over the drag and drop operation, like
displaying a can't accept icon when wrong type file is dragged over your
(This shows how to do it for a Listbox, the code is almost exactly the same
for a dialogbox)
The other method is to catch WM_DROPFILES in your dialog box, this will only
tell you when something is dropped on your window and you will then be able
to either open it or display a message saying that you couldn't open it.
"Abbott Zhang" <email@example.com> wrote in message
When I use subversion(TortoiseSVN ) in my project. I always drag-drop
files from SVN browser to my desktop. I also find that it is work when
I drag-drop files to Firefox or Notepad++(not worked on MS notepad).
I am wondering how to accept the drag-drop files from in MFC dialogue
based program.I have tried handleing message WM_DROPFILES but it does
Anyone who have any ideas?
Thank you very much.