I am trying to implement paste operations in my winforms app that were being cut or copied in windows explorer and vice versa. I already have a working cut and copy functionality within the application but I need to be able to also detect cut and copy operations done in windows explorer and being able to paste while using my app.
My app is basically a self-made file explorer consisting of a listview and treeview. I have done some research and so far have failed to find a solution, hence this question.
I took a look at this question and I don't know how I can read the mentioned CFSTR_PREFERREDDROPEFFECT
or how Windows Explorer actually knows if a paste operation is a Move or Copy.
My goal is to be able to perform a paste operation from a cut or copy command that the user invoked in Windows Explorer in my application while knowing whether the intended execution is a copy or a move. I know that there is a Clipboard
class which has SetFileDropList()
and GetFileDropList()
but those methods do not tell me if the user wishes to cut or copy the files in the clipboard. Thanks in advance folks.