public void UpdateToolTipText(string toolTipText) { System.Workflow.Interop.NativeMethods.TOOLINFO toolInfo = this.GetToolInfo(); toolInfo.hwnd = this.parentHandle; toolInfo.text = Marshal.StringToBSTR(toolTipText); System.Workflow.Interop.NativeMethods.SendMessage(base.Handle, System.Workflow.Interop.NativeMethods.TTM_UPDATETIPTEXT, IntPtr.Zero, ref toolInfo); }
public void UpdateToolTipRectangle(Rectangle rectangle) { System.Workflow.Interop.NativeMethods.TOOLINFO toolInfo = this.GetToolInfo(); toolInfo.hwnd = this.parentHandle; toolInfo.rect.left = rectangle.Left; toolInfo.rect.top = rectangle.Top; toolInfo.rect.right = rectangle.Right; toolInfo.rect.bottom = rectangle.Bottom; System.Workflow.Interop.NativeMethods.SendMessage(base.Handle, System.Workflow.Interop.NativeMethods.TTM_NEWTOOLRECT, IntPtr.Zero, ref toolInfo); }
void IDisposable.Dispose() { if (this.parentHandle != IntPtr.Zero) { System.Workflow.Interop.NativeMethods.TOOLINFO toolInfo = this.GetToolInfo(); toolInfo.hwnd = this.parentHandle; this.DelTool(toolInfo); this.DestroyHandle(); this.parentHandle = IntPtr.Zero; } }
private System.Workflow.Interop.NativeMethods.TOOLINFO GetToolInfo() { System.Workflow.Interop.NativeMethods.TOOLINFO toolinfo; toolinfo = new System.Workflow.Interop.NativeMethods.TOOLINFO { size = Marshal.SizeOf(toolinfo), flags = 0, hwnd = IntPtr.Zero, id = IntPtr.Zero }; toolinfo.rect.left = toolinfo.rect.right = toolinfo.rect.top = toolinfo.rect.bottom = 0; toolinfo.hinst = IntPtr.Zero; toolinfo.text = new IntPtr(-1); toolinfo.lParam = IntPtr.Zero; return(toolinfo); }
internal NativeToolTip(IntPtr parentHandle) { this.parentHandle = parentHandle; CreateParams cp = new CreateParams { ClassName = "tooltips_class32", Style = -2147483645, ExStyle = 8, Parent = this.parentHandle }; this.CreateHandle(cp); if (IntPtr.Zero == base.Handle) { throw new NullReferenceException(SR.GetString("Error_CreatingToolTip")); } System.Workflow.Interop.NativeMethods.TOOLINFO toolInfo = this.GetToolInfo(); toolInfo.flags = 0x110; toolInfo.hwnd = this.parentHandle; this.AddTool(toolInfo); this.Activate(false); }
private void DelTool(System.Workflow.Interop.NativeMethods.TOOLINFO toolInfo) { System.Workflow.Interop.NativeMethods.SendMessage(base.Handle, System.Workflow.Interop.NativeMethods.TTM_DELTOOL, IntPtr.Zero, ref toolInfo); }
private bool AddTool(System.Workflow.Interop.NativeMethods.TOOLINFO toolInfo) { return(System.Workflow.Interop.NativeMethods.SendMessage(base.Handle, System.Workflow.Interop.NativeMethods.TTM_ADDTOOL, IntPtr.Zero, ref toolInfo) != IntPtr.Zero); }
private System.Workflow.Interop.NativeMethods.TOOLINFO GetToolInfo() { System.Workflow.Interop.NativeMethods.TOOLINFO toolinfo; toolinfo = new System.Workflow.Interop.NativeMethods.TOOLINFO { size = Marshal.SizeOf(toolinfo), flags = 0, hwnd = IntPtr.Zero, id = IntPtr.Zero }; toolinfo.rect.left = toolinfo.rect.right = toolinfo.rect.top = toolinfo.rect.bottom = 0; toolinfo.hinst = IntPtr.Zero; toolinfo.text = new IntPtr(-1); toolinfo.lParam = IntPtr.Zero; return toolinfo; }