BOOL EnumChildWindows(
HWND hWndParent, // handle to parent window
WNDENUMPROC lpEnumFunc, // pointer to callback function
LPARAM lParam // application-defined value
);
关键在于定义一个回调函数,EnumChildWindows每取到一个ChileWindow,
就会执行回调函数,回调函数有ChildWindow的Handle
回调函数:
BOOL CALLBACK EnumChildProc(
HWND hwnd, // handle to child window
LPARAM lParam // application-defined value
);
Win32API的说明更详细