遍历父窗口下面所有子窗口信息
BOOL CALLBACK EnumChildProc(HWND hwnd,LPARAM lParam)
{
CHAR NAME[255];
LPTSTR lpString=NAME;
LPTSTR lpClassName=NAME;
INT nMaxCounte=255;
GetWindowText(hwnd,lpString,nMaxCounte);
TRACE("子窗口名:%s",lpString);
GetClassName(hwnd,lpClassName,nMaxCounte);
TRACE("子类名:%s\r\n",lpClassName);
return true;
}
BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM lParam)
{
CHAR NAME[255];
LPTSTR lpString=NAME;
LPTSTR lpClassName=NAME;
INT nMaxCounte=255;
GetWindowText(hwnd,lpString,nMaxCounte);
TRACE("父窗口名:%s",lpString);
GetClassName(hwnd,lpClassName,nMaxCounte);
TRACE("父类名:%s\r\n",lpClassName);
EnumChildWindows(hwnd,EnumChildProc,lParam);
return true;
}
本文链接:https://it72.com:4443/60.htm