예제 #1
0
        public void Show()
        {
            editToolTip ebt = new editToolTip();

            ebt.cbStruct = Marshal.SizeOf(ebt);
            ebt.pszText = m_text;
            ebt.pszTitle = m_title;
            ebt.ttiIcon = (int)m_titleIcon;

            IntPtr ptrStruct = Marshal.AllocHGlobal(Marshal.SizeOf(ebt));
            Marshal.StructureToPtr(ebt, ptrStruct, true);

            System.Diagnostics.Debug.Assert(m_parent != null, "Parent control is null", "Set parent before calling Show");

            int ret = SendMessage(m_parent.Handle,
                EM_SHOWBALLOONTIP,
                0, ptrStruct);

            Marshal.FreeHGlobal(ptrStruct);
        }
예제 #2
0
        public void Show()
        {
            editToolTip ebt = new editToolTip();

            ebt.cbStruct = Marshal.SizeOf(ebt);
            ebt.pszText  = m_text;
            ebt.pszTitle = m_title;
            ebt.ttiIcon  = (int)m_titleIcon;

            IntPtr ptrStruct = Marshal.AllocHGlobal(Marshal.SizeOf(ebt));

            Marshal.StructureToPtr(ebt, ptrStruct, true);

            System.Diagnostics.Debug.Assert(m_parent != null, "Parent control is null", "Set parent before calling Show");

            int ret = SendMessage(m_parent.Handle,
                                  EM_SHOWBALLOONTIP,
                                  0, ptrStruct);

            Marshal.FreeHGlobal(ptrStruct);
        }