views:

9

answers:

1

I have an application with a file and folder list control which supports Drag&Drop operations. Now I would like to make it possible for the user to be able to drop a Windows 7 Library (e.g. Music, Pictures and so on) into this control.

In my drop handler I have a COleDataObject and now I'm trying to find out, if a library has been dropped into the control. Since the object does not seem to contain a standard format (e.g. CF_HDROP), I'm using COleDataObject::BeginEnumFormats and COleDataObject::GetNextFormat to enumerate the formats in the data object. I get a total of 5 different FORMATETC structures.

Here's a list of the FORMATETC.cfFormat and FORMATETC.tymed members of the individual structures:

  1. cfFormat = 0xc0a5, tymed = 0x1
  2. cfFormat = 0xc418, tymed = 0x1
  3. cfFormat = 0xc410, tymed = 0x1
  4. cfFormat = 0xc0fd, tymed = 0x4
  5. cfFormat = 0xc0fc, tymed = 0x1

Can anyone tell me if one of them is pointing to a shell library and if so, how I would be able to e.g. determine the parsing name of this library? Are these cfFormat values perhaps documented somewhere?

Best regards,

humbagumba

A: 

These MSDN pages might help:

http://msdn.microsoft.com/en-us/library/bb776902%28VS.85%29.aspx http://msdn.microsoft.com/en-us/library/ff729168%28VS.85%29.aspx

They don't have the exact format values you've given, but it should be a start.

Mark Ransom
Yes... reading a little bit it seems like I have to first register one of those shell clipboard formats before I can use them in my application. Now the question is, which of the formats would be the right one? I guess I would try CFSTR_SHELLIDLIST first.. but of course if someone would know the exact procedure here I would appreciate it :)
humbagumba
I figured it out. But thanks anyway for pointing me in the right direction :)
humbagumba