public int MoveToPoint(Point point, Interop.COORD_SYSTEM eCoordSystem, Interop.IHTMLElement pElementContext, uint dwHitTestOptions) { uint pdwHitTestResults; Interop.POINT ptPoint = new Interop.POINT(); ptPoint.x = point.X; ptPoint.y = point.Y; dp.MoveToPoint(ptPoint, eCoordSystem, pElementContext, dwHitTestOptions, out pdwHitTestResults); return((int)pdwHitTestResults); }
protected override void OnDoubleClick(EventArgs e) { base.OnDoubleClick(e); Interop.POINT pt = new Interop.POINT(0, 0); Interop.GetCursorPos(ref pt); Point point2 = base.PointToClient(new Point(pt.x, pt.y)); TreeNode nodeAt = base.GetNodeAt(point2); if (nodeAt == base.SelectedNode) { this.OnNodeDoubleClick(new TreeViewEventArgs(nodeAt, TreeViewAction.ByMouse)); } }
/////////////////////////////////////////////////////////////////////////// // IDocHostUIHandler Implementation public int ShowContextMenu(int dwID, Interop.POINT pt, object pcmdtReserved, object pdispReserved) { // Point location = hostControl.PointToClient(new Point(pt.x, pt.y)); // // ShowContextMenuEventArgs e = new ShowContextMenuEventArgs(location, false); // // try { // hostControl.OnShowContextMenu(e); // } // catch { // // Make sure we return Interop.S_OK // } // return(Interop.S_OK); }
public int ShowContextMenu(int dwID, ref Interop.POINT pt, object pcmdtReserved, object pdispReserved) { Point location = htmlEditor.PointToClient(new Point(pt.x, pt.y)); Interop.IHTMLElement element = this.MSHTMLDocument.ElementFromPoint(location.X, location.Y); Control ielement = this.htmlEditor.GenericElementFactory.CreateElement(element); ShowContextMenuEventArgs e = new ShowContextMenuEventArgs(location, false, dwID, ielement); try { htmlEditor.OnShowContextMenu(e); } catch { // Make sure we return Interop.S_OK } return(Interop.S_OK); }
public int ShowContextMenu(int dwID, Interop.POINT pt, object pcmdtReserved, object pdispReserved) { int ret = Interop.S_FALSE; Point location = hostControl.PointToClient(new Point(pt.x, pt.y)); BrowserContextMenuCancelEventArgs e = new BrowserContextMenuCancelEventArgs(location, false); try { hostControl.RaiseOnShowContextMenu(e); } catch {} finally { if (e.Cancel) { ret = Interop.S_OK; } } return(ret); }
public static extern bool GetCaretPos([Out] out Interop.POINT pPoint);
int Interop.IDocHostShowUI.ShowHelp(IntPtr hwnd, string lpHelpFile, uint uCommand, uint dwData, Interop.POINT ptMouse, object pDispatchObjectHit) { return(Interop.S_OK); }
public Interop.POINT GetLocation(bool fTranslate) { Interop.POINT pPoint = new Interop.POINT(); cr.GetLocation(ref pPoint, fTranslate); return(pPoint); }
public Interop.POINT TransformPoint(Interop.POINT pPoint, Interop.COORD_SYSTEM eSource, Interop.COORD_SYSTEM eDestination, IElement element) { Interop.IHTMLElement pIElement = element.GetBaseElement(); ds.TransformPoint(ref pPoint, eSource, eDestination, pIElement); return(pPoint); }
private void OnShowContextMenu() { if ((this._owner != null) && this._owner.IsHandleCreated) { ShowContextMenuEventHandler handler = (ShowContextMenuEventHandler) base.Events[EventShowContextMenu]; if (handler != null) { Interop.POINT pt = new Interop.POINT(); Interop.GetCursorPos(ref pt); Point p = new Point(pt.x, pt.y); p = this._owner.PointToClient(p); Interop.SetForegroundWindow(this._owner.Handle); ShowContextMenuEventArgs e = new ShowContextMenuEventArgs(p, false); handler(this, e); Interop.PostMessage(this._owner.Handle, 0, IntPtr.Zero, IntPtr.Zero); } } }
public void SetItemPosition(int t, Interop.POINT pt) { throw new NotImplementedException(); }