New article : Drag/Drop a non-existent file into Windows Explorer

Here’s an article I wrote for The Code Project that shows how you can drag and drop a virtual file (one that does not physically exist on disk) from your app into Windows Explorer. It’s useful for scenarios like extracting a file from an archive or where the source file is on a remote machine.

Advertisements

7 thoughts on “New article : Drag/Drop a non-existent file into Windows Explorer

  1. Very cool Nish. I’ve had to write similar C# code to do virtual file drops with explorer. The tricky part for me was to keep explorer waiting while I grabbed the file data from a remote server. Once it’s working, though, it’s pretty cool.

  2. Hi Nish,

    I’m not using MFC, and m supposed to drag virtual file to explorer/desktop as hglobal. The problem m facing is that the Target calls IDataObject::GetData with CFFormat CFSTR_FILEGROUPDESCRIPTOR but then never turns up for CFSTR_FILECONTENTS instead asks for CFSTR_SHELLIDLIST. I’m not very sure why this is happening. Only thing that i’m doing different is that i’m not setting lindex member of FORMATETC (which when i did, didn’t make any difference). Any clues as to why the target doesn’t ask for the file contents

  3. I am glad to have the opportunity to visit this blog,really happy.I am a college of china,I just began my MFC travling, but I face the biggest problem that I don’t know how to choose in that there are so many classes and controls ,functions and etc. I wanna get a introduction about how to begin my MFC Travling,If you have time ,if you will, please do me a favor,So much thanks to you.

  4. HEllo everyone I work for a company that is looking for c++,win32,unix developers in midtown
    NYC email me if interested up to 200k total comp

  5. Hi Nish,

    Thanks for the excellent article. I was looking for such for some time. My requirement is to drag and drop files between remote systems. I learnt how to drag the files using your help (only difference being that the code is in Win32).I need to know the path where the file gets dropped so that I can transfer the remote file to that particular path.

    Can you please spare a few moments for this.

    Thanks in advance.

    Regards,
    Praveen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s