C#EnumChildWindows无法枚举所有子窗口的解决方法
程序代码:
string WinClassName = "Itasca2Manager"; IntPtr myIntPtr = FindWindow(WinClassName, null); Console.WriteLine("主窗体的句柄为:" + myIntPtr.ToInt32()); bool S = EnumChildWindows(myIntPtr, callback, IntPtr.Zero); for (int i = 0; i < listWnd.Count; i++) { Console.WriteLine("第{0}子窗口的句柄为{1}",i+1, listWnd[i]); }