Esempio n. 1
0
        /// <summary>
        /// Removes the tool tip.
        /// </summary>
        /// <param name="window">The window.</param>
        public void RemoveToolTip(IWin32Window window)
        {
            const int TTM_DELTOOL = 0x433;

            NativeMethods.TOOLINFO lParam = GetTOOLINFO(window);
            NativeMethods.SendMessageTOOLINFO(Handle, TTM_DELTOOL, 0, lParam);
        }
Esempio n. 2
0
        /// <summary>
        /// Adds the tool.
        /// </summary>
        /// <param name="window">The window.</param>
        public void AddTool(IWin32Window window)
        {
            const int TTM_ADDTOOL = 0x432;

            NativeMethods.SendMessage(Handle, 0x418, 0, SystemInformation.MaxWindowTrackSize.Width);

            NativeMethods.TOOLINFO lParam = GetTOOLINFO(window);
            IntPtr result = NativeMethods.SendMessageTOOLINFO(Handle, TTM_ADDTOOL, 0, lParam);
        }
Esempio n. 3
0
        internal NativeMethods.TOOLINFO GetTOOLINFO(IWin32Window window)
        {
            const int TTF_IDISHWND = 1;
            //const int TTF_ABSOLUTE = 0x80;
            //const int TTF_CENTERTIP = 2;
            const int TTF_SUBCLASS = 0x10;
            //const int TTF_TRACK = 0x20;
            //const int TTF_TRANSPARENT = 0x100;

            var toolinfo_tooltip = new NativeMethods.TOOLINFO();

            toolinfo_tooltip.hwnd     = window.Handle;
            toolinfo_tooltip.uFlags   = TTF_IDISHWND | TTF_SUBCLASS;
            toolinfo_tooltip.uId      = window.Handle;
            toolinfo_tooltip.lpszText = (IntPtr)(-1);  // LPSTR_TEXTCALLBACK

            return(toolinfo_tooltip);
        }
Esempio n. 4
0
 public static extern IntPtr SendMessageTOOLINFO(IntPtr hWnd, int Msg, int wParam, NativeMethods.TOOLINFO lParam);