int UnsafeNativeMethods.IOleDropTarget.OleDragOver(int grfKeyState, UnsafeNativeMethods.POINTSTRUCT pt, ref int pdwEffect) { Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "OleDragOver recieved"); NativeMethods.POINTL ptl = new NativeMethods.POINTL(); ptl.x = pt.x; ptl.y = pt.y; Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "\t" + (ptl.x) + "," + (ptl.y)); DragEventArgs drgevent = CreateDragEventArgs(null, grfKeyState, ptl, pdwEffect); owner.OnDragOver(drgevent); pdwEffect = (int)drgevent.Effect; lastEffect = drgevent.Effect; return NativeMethods.S_OK; }
int UnsafeNativeMethods.IOleDropTarget.OleDragOver(int grfKeyState, long pt, ref int pdwEffect) { NativeMethods.POINTL pointl = new NativeMethods.POINTL { x = this.GetX(pt), y = this.GetY(pt) }; DragEventArgs e = this.CreateDragEventArgs(null, grfKeyState, pointl, pdwEffect); this.owner.OnDragOver(e); pdwEffect = (int) e.Effect; this.lastEffect = e.Effect; return 0; }
int UnsafeNativeMethods.IOleDropTarget.OleDragEnter(object pDataObj, int grfKeyState, long pt, ref int pdwEffect) { NativeMethods.POINTL pointl = new NativeMethods.POINTL { x = this.GetX(pt), y = this.GetY(pt) }; DragEventArgs e = this.CreateDragEventArgs(pDataObj, grfKeyState, pointl, pdwEffect); if (e != null) { this.owner.OnDragEnter(e); pdwEffect = (int) e.Effect; this.lastEffect = e.Effect; } else { pdwEffect = 0; } return 0; }
int UnsafeNativeMethods.IOleDropTarget.OleDragEnter(object pDataObj, int grfKeyState, UnsafeNativeMethods.POINTSTRUCT pt, ref int pdwEffect) { Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "OleDragEnter recieved"); NativeMethods.POINTL ptl = new NativeMethods.POINTL(); ptl.x = pt.x; ptl.y = pt.y; Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "\t" + (ptl.x) + "," + (ptl.y)); Debug.Assert(pDataObj != null, "OleDragEnter didn't give us a valid data object."); DragEventArgs drgevent = CreateDragEventArgs(pDataObj, grfKeyState, ptl, pdwEffect); if (drgevent != null) { owner.OnDragEnter(drgevent); pdwEffect = (int)drgevent.Effect; lastEffect = drgevent.Effect; } else { pdwEffect = (int)DragDropEffects.None; } return NativeMethods.S_OK; }