Drag Drop Question

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

To allow someone to drop something into a control is simple

dragenter put:
if (e->Data->GetDataPresent(DataFormats::Text))

e->Effect = DragDropEffects::Copy;

else

e->Effect = DragDropEffects::None;

and then DragLeave:

whatever the name->Text = e->Data->GetData(DataFormats::Text)->ToString();

But how do you let someone drag something out of your control and put it in
say Word? I've never been able to figure that out.
 
Gary said:
But how do you let someone drag something out of your control and put it
in say Word? I've never been able to figure that out.

Then your control needs to become a "drop source". I think it does by
implementing the IDropSource interface:

http://windowssdk.msdn.microsoft.com/en-us/library/ms649605.aspx

But I'm hazy on the details. You might find a more authoritative source of
information in the shell group:

microsoft.public.platformsdk.shell

Regards,
Will
 

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

Back
Top