コード例 #1
0
ファイル: Win32API.cs プロジェクト: daricvn/autoquit2
        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());
        }
コード例 #2
0
ファイル: Win32API.cs プロジェクト: daricvn/autoquit2
        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());
        }
コード例 #3
0
ファイル: Win32API.cs プロジェクト: daricvn/autoquit2
 public static void SetText(IntPtr handle, string value)
 {
     InputBridge.SendMessage(handle, (uint)SystemDefined.WM_SETTEXT, 0, new StringBuilder(value));
 }