Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Fri Dec 19, 2008 9:49 am Post subject: HOWTO: Specify the default drop action during drag-drop |
|
|
When an item in your namespace extension is dragged over another location, the default (when Ctrl or Shift keys are not pressed) drop action (Move,Copy or Link) depends on the attributes that the dragged items have. However, you can specify the default drop actions using the SetPreferredDropEffect method in the InitDataObject method as follows:
Code: |
void CFolderItem::InitDataObject(CInitDataObjectEventArgs& e)
{
...
...
// Set default drop action to 'Copy'
e.dataObject->SetPreferredDropEffect(DROPEFFECT_COPY);
...
...
} |
|
|