Adding file to clipboard?

Mar 30, 2012 at 11:47pm
Hello,
I have a program which manages audio files in a list.If the user presses "ctrl+c" I would like to copy the files to the clipboard so he can paste the files in for example a folder.
I have the whole file path so how can I add the file to the clipboard?
Searching on the internet didn't seem to help me so much, since they only explain how to copy text or images to the clipboard.

Regards,

Simon H.A.
Mar 31, 2012 at 1:06am
Mar 31, 2012 at 8:19am
Use CF_HDROP, of course, this is what windows explorer uses.
Mar 31, 2012 at 11:39am
Okay, that seems pretty straight-out. But what method should be used with the CF_HDROP to create a HANDLE from a file?

Regards,

Simon H.A.
Mar 31, 2012 at 1:33pm
Ah, yes, I misread the OP.

You want to transfer the file names, and not the file data?
Use CF_HDROP.
Mar 31, 2012 at 1:52pm
No I want to add the files to the clipboard so you can press "ctrl+v" in a folder an it will copy the files to that folder. Just like in for example iTunes when you mark some files in a playlist and press "ctrl+c" you can copy the files to a folder in the Explorer.

Regards,

Simon H.A.
Mar 31, 2012 at 9:13pm
The file itself is not put in the clipboard -- the file name is. CF_HDROP is what you are looking for. The actual file move/copy is done by the receiving application.
Topic archived. No new replies allowed.