Pasting from Clipboard into Windwos Explorer

G

Guest

Hello! I'm writing an namespace extension in C++ using ATL. I'm dealing with
files which are not on the machine where the NSE is running. I want to
provide a way to copy the remote files into the local machine. I provide a
DnD mechanism, by which I record the names of the files when the user starts
to drag, then load the bytes just when the user drops.
I wanted to provide also the Copy/Paste functionality, both through
CTRL-C/CTRL-V and through the use of context menus. I thought of copying the
file names into the clipboard when the user 'copies' and retrieving the bytes
when the user 'pastes', but how can I catch the event 'paste' if the user
wants to paste the files in Explorer (i.e. outside of my NSE)? I chose this
approach because I thought it was the one used by Explorer, but if you have
other suggestions, please tell me!
Thank you in advance!
 
D

David Lowndes

...
I wanted to provide also the Copy/Paste functionality, both through
CTRL-C/CTRL-V and through the use of context menus. I thought of copying the
file names into the clipboard when the user 'copies' and retrieving the bytes
when the user 'pastes', but how can I catch the event 'paste' if the user
wants to paste the files in Explorer (i.e. outside of my NSE)?

Are you supporting the clipboard format that the shell uses for files
or something of your own? Have a look at "Handling Shell Data Transfer
Scenarios" on MSDN.

Dave
 
G

Guest

In the DnD I'm just supporting CF_HDROP! Thanks for the link, I'll go through
it at once! It seems I'll be able to reuse my IDataObject implementation!!! ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top