BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
TCHAR szBuf[4096];
GetClassName(hwnd, szBuf, sizeof(szBuf));
string str = szBuf;
if(!str.compare("#32770"))
{
HWND hSubWnd = GetDlgItem(hwnd, 0xffff);
if(hSubWnd)
{
int len = GetWindowText(hSubWnd, szBuf, sizeof(szBuf));
cout << "yes:" <<szBuf <<endl;
}
}
return TRUE;
}
int main()
{
EnumWindows(EnumWindowsProc, NULL);
return 0;
}