using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
namespace parol_udal
{
class Program
{
[DllImport("user32.dll",CharSet=CharSet.Auto,SetLastError=true)]
public static extern IntPtr FindWindow(string sClassName,string sWindowName);
[DllImport("user32.dll",CharSet=CharSet.Auto,SetLastError=true)]
public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpClassName, string lpWindowName);
[DllImport("user32.dll",CharSet=CharSet.Auto ,SetLastError = true)]
public static extern int GetWindowText (IntPtr hwnd,StringBuilder lpString,int nMaxCount);
[DllImport("user32.dll",CharSet=CharSet.Auto, SetLastError = true)]
static extern int GetWindowTextLength(IntPtr hWnd);
static void Main()
{
IntPtr thisWindow = FindWindow(null, "Window description Parent");
IntPtr Rod = thisWindow;
IntPtr otherWindow = FindWindowEx(Rod, IntPtr.Zero, "RICHEDIT50W", null);
int len = GetWindowTextLength(otherWindow);
StringBuilder sb = new StringBuilder(len);
len = GetWindowText(otherWindow, sb, len);
Console.WriteLine(sb.ToString(0,len));
Console.WriteLine(thisWindow);
Console.WriteLine(otherWindow);
Console.ReadKey(true);
}
}
}
Please help, how to get title "otherWindow"?