public override DragDropEffects ProvideDragFeedback(Point screenPoint, int keyState, DragDropEffects supportedEffects) { if (_unhandledDropTarget == null) { return(DragDropEffects.None); } _mkKeyState = MshtmlEditorDragAndDropTarget.ConvertKeyState(keyState); _effect = MshtmlEditorDragAndDropTarget.ConvertDropEffect(supportedEffects); _point = new POINT(); _point.x = screenPoint.X; _point.y = screenPoint.Y; // We have to call begin drag here because we need the location and key state which we dont have in BeginDrag() if (!_hasCalledBeginDrag) { _hasCalledBeginDrag = true; _unhandledDropTarget.DragEnter(_oleDataObject, _mkKeyState, _point, ref _effect); } _unhandledDropTarget.DragOver(_mkKeyState, _point, ref _effect); return(MshtmlEditorDragAndDropTarget.ConvertDropEffect(_effect)); }
public UnhandledDropTarget(DataObjectMeister dataObject, DataFormatHandlerContext handlerContext, OpenLiveWriter.Interop.Com.IDropTarget unhandledDropTarget) : base(dataObject, handlerContext) { _unhandledDropTarget = unhandledDropTarget; _oleDataObject = MshtmlEditorDragAndDropTarget.ExtractOleDataObject(DataMeister.IDataObject); }