static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);
Exemple #2
0
 public static int GetTextLength(RichTextBox rt)
 {
     GETTEXTLENGTHEX GTL = new GETTEXTLENGTHEX();
     GTL.uiFlags = GTL_DEFAULT;
     GTL.uiCodePage = CP_UNICODE;
     return (int)SendMessage(rt.Handle, (IntPtr)EM_GETTEXTLENGTHEX, ref GTL, IntPtr.Zero);
 }
Exemple #3
0
 private static extern int SendMessage(IntPtr hWnd, IntPtr msg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);
 public static extern int GetTextLength(IntPtr hWnd, int Msg, ref GETTEXTLENGTHEX wParam, StringBuilder lParam);