Exemplo n.º 1
0
        int ISpellCheckableRichEditor.GetBaselineOffset(CharRange error)
        {
            LINERECT lr = new LINERECT();

            lr.lineIndex = SendMessage(TX_LINEFROMCHAR, 0, error.Start) - 1;
            if (lr.lineIndex > -1)
            {
                SendMessage(this.Handle, TX_GETLINERECT, 0, ref lr);
                return((int)(lr.lineRect.height / 1440f * Dpi.Y * (this.ZoomFactor / 100f) - 2));
            }
            else
            {
                return(this.Font.Height - 2);
            }
        }
Exemplo n.º 2
0
 private static extern int SendMessage(IntPtr hWnd, int msg, int wParam, ref LINERECT lr);