Exemple #1
0
        public static string GetControlText(IntPtr handle)
        {
            if (!IsWindowVisible(handle))
            {
                return(string.Empty);
            }
            StringBuilder sb = new StringBuilder(PROP_MAXTEXTLENGTH);

            InputBridge.SendMessage(handle, (uint)SystemDefined.WM_GETTEXT, sb.Capacity, sb);
            return(sb.ToString());
        }
Exemple #2
0
        public static string GetControlName(IntPtr handle)
        {
            if (!IsWindowVisible(handle))
            {
                return(string.Empty);
            }
            if (WM_GETCONTROLNAME == -1)
            {
                WM_GETCONTROLNAME = RegisterWindowMessage("WM_GETCONTROLNAME");
            }
            StringBuilder sb = new StringBuilder(PROP_MAXTEXTLENGTH);

            InputBridge.SendMessage(handle, (uint)WM_GETCONTROLNAME, sb.Capacity, sb);
            return(sb.ToString());
        }
Exemple #3
0
 public static void SetText(IntPtr handle, string value)
 {
     InputBridge.SendMessage(handle, (uint)SystemDefined.WM_SETTEXT, 0, new StringBuilder(value));
 }