Reputation: 1183
I am trying to make a Windows Explorer-like program in C++ without MFC.
It has a list view which shows the file system directories and files.
I want to add the drop target functionality for the list view,
so I implemented IDropTarget interface and registered the hwnd.
With IDropTargetHelper, I simply achieved the desired drag&drop effect in DragEnter, DragOver, DragLeave method.
But in Drop method, the dropTargetHelper was helpless.
My list view only accepts File drops.
Should I implement the dropped files' COPY, MOVE, LINK operation for myself?
OR is there a simple shell file operation helper which accepts dropped IDataObject?
EDIT:
I know how to get filenames from the dropped object, and just file copying is easy.
But I think maybe there are more things to consider: for example, making a file link, source item is virtual, and so on.
So I wonder if there are helper methods available from Windows shell.
Upvotes: 3
Views: 4077
Reputation: 179779
The textbook example would be the one from MSDN. Do read Old New Thing articles 1 and 2.
Upvotes: 2