Drag/Drop from Server

I am creating an MFC application which allows a user to explore files in a database and interact with them as if it were a Windows Explorer window. This includes file deletion, uploading, and downloading to a local directory. I want to include drag/drop functionality, so a user can drag files from the database to a local directory in Windows Explorer, and vice versa. The dragging from Explorer to the database was easy, as I merely had to handle the WM_ONDROP message and pull file information from the hDrop object. Going in the reverse direction, however, has proved to be very difficult. Brainstorming, I have imagined the following problematic solutions:

1) Handling the WM_ONLBUTTONUP message within my application, retrieving the current directory of the window under the mouse. Unfortunately, this simply cannot be done.

2) Handling the WM_ONLBUTTONUP message, copying the files from the server to a local temp directory, creating an hDrop object out of the filepaths, and calling DoDragDrop. Of course, this doesn't work because the drop is already over by the time DoDragDrop is called, and there are no files yet available for Explorer to copy.

My supervisor provided me with a tutorial on OLE drag/drop with COM objects, but I am having one heck of a time understanding it (http://www.catch22.net/tuts/dragdrop.asp). He suspects the iStream interface is the solution, but I can't find any examples of its use online.

If anyone is familiar with how to implement drag/drop with files that do not already exist in the local file system, please let me know.

Thanks,

Paul Fake
Software Development Intern
CygNet Software, Inc.
[1717 byte] By [Paul Fake] at [2007-11-20 11:59:52]