예제 #1
0
        // Determine the length of a control's Text.  Required since using the
        // RichTextBox .Length property wipes out the Undo/Redo buffer.
        public static int GetTextLength(IntPtr hControl)
        {
            GETTEXTLENGTHEX lpGTL = new GETTEXTLENGTHEX();

            lpGTL.uiFlags    = 0;
            lpGTL.uiCodePage = 1200;                                    // Unicode
            return(SendMessage(hControl, EM_GETTEXTLENGTHEX, ref lpGTL, IntPtr.Zero));
        }
예제 #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));
        }
 static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);
예제 #4
0
 private static extern int SendMessage(IntPtr hWnd, IntPtr msg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);
예제 #5
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);
 }
예제 #6
0
 internal static extern int SendMessage(IntPtr hWnd, int msg, ref GETTEXTLENGTHEX wParam, int lParam);
예제 #7
0
 static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);
예제 #8
0
 public static extern int SendMessage(IntPtr hWnd, int Msg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);
예제 #9
0
 public static extern int GetTextLength(IntPtr hWnd, int Msg, ref GETTEXTLENGTHEX wParam, StringBuilder lParam);
예제 #10
0
 private static extern void RichTextBox_GetTextLengthEx(out GETTEXTLENGTHEX value);
예제 #11
0
 private static extern int SendMessage(IntPtr hWnd, IntPtr msg, ref GETTEXTLENGTHEX wParam, IntPtr lParam);