C#中 EunmChildWindows使用实例

来源:百度知道 编辑:UC知道 时间:2024/06/07 11:42:33
EnumWindowsProc 这个没有定义

我想你指的是:EnumChildWindows,只是个winapi函数
在c#中的声明,供你参考
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool EnumChildWindows(IntPtr hwndParent, EnumWindowsProc lpEnumFunc, IntPtr lParam);
public delegate bool Win32Callback(IntPtr hwnd, IntPtr lParam);
[DllImport("user32.Dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumChildWindows(IntPtr parentHandle, Win32Callback callback,IntPtr lParam);

d