+ DWORD effectiveAction;
+ if ( defaultAction == wxDragCopy )
+ effectiveAction = flags & MK_SHIFT ? DROPEFFECT_MOVE : DROPEFFECT_COPY;
+ else
+ effectiveAction = flags & MK_CONTROL ? DROPEFFECT_COPY : DROPEFFECT_MOVE;
+
+ if ( !(effectiveAction & pdwEffect) )
+ {
+ // the action is not supported by drag source, fall back to something
+ // that it does support
+ if ( pdwEffect & DROPEFFECT_MOVE )
+ effectiveAction = DROPEFFECT_MOVE;
+ else if ( pdwEffect & DROPEFFECT_COPY )
+ effectiveAction = DROPEFFECT_COPY;
+ else if ( pdwEffect & DROPEFFECT_LINK )
+ effectiveAction = DROPEFFECT_LINK;
+ else
+ effectiveAction = DROPEFFECT_NONE;
+ }
+
+ return effectiveAction;