C# 根据父窗口的标题和子窗口的类名返回子窗口的句柄
2021-03-07 10:26
标签:代码 his stat cli 句柄 dna href 项目 htm
很老的项目中的代码,现在也想不起来为什么要这么写了。 C# 根据父窗口的标题和子窗口的类名返回子窗口的句柄 标签:代码 his stat cli 句柄 dna href 项目 htm 原文地址:https://www.cnblogs.com/lonelyxmas/p/12833897.html [DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
public extern static int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
[DllImport("User32.dll ")]
public static extern IntPtr FindWindowEx(IntPtr parent, IntPtr childe, string strclass, string FrmText);
[DllImport("user32.dll")]
public static extern int EnumChildWindows(IntPtr hWndParent, CallBack lpfn, int lParam);
public delegate bool CallBack(IntPtr hwnd, int lParam);
///
文章标题:C# 根据父窗口的标题和子窗口的类名返回子窗口的句柄
文章链接:http://soscw.com/index.php/essay/61287.html