Getting and Using IDataObject from Virtual Folders (Shell Namespace Extentions

J

JP

I have an app that represents ShellFolder Items as a visual element
(listview item, etc). The code correctly performs Drag&Drop operations
EXCEPT in the case when the item being dragged is from a Virtual
Folder. The problem is that the DragSource is my app, not the Virtual
Folder, and therefore the IDataObject interface is clueless about how
to get the data.
My understanding is that I need to obtain and use the IDataObject
Interface of the Folder, since the Folder is the only thing that knows
how to extract the data. This I can do.
My Question:
How do I instruct the Folder's IDataObject as to which items
controlled by that folder should be included/made available through the
IDataObject?
My initial thought is to use the IDataObject's SetData method to pass
it a "Shell IDList Array" (CIDA) structure containing the items I want.
However, this seems backwards to me.
There must be some "normal" or "usual" way to do this, I just don't
know what that is.
Any help -- references, samples, advice, etc will be appreciated!

Thanks,
JP
 
W

William DePalo [MVP VC++]

JP said:
I have an app that represents ShellFolder Items as a visual element
(listview item, etc). The code correctly performs Drag&Drop operations
EXCEPT in the case when the item being dragged is from a Virtual
Folder.
...
Any help -- references, samples, advice, etc will be appreciated!

If no one responds here try posting again in the group

microsoft.public.platformsdk.shell

Regards,
Will
 
A

Atul

What you are doing is correct. Set the PIDL for the virtual folder as the
data for the dragdrop in the CFSTR_SHELLIDLIST format.
During dragdrop, use the IDropTarget of the folder which the dragdrop
operation is currently over.

- Atul
Sky Software http://www.ssware.com/
Drop-In Windows Explorer-Like Shell Browsing UI for your apps.
 

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