#include <iostream.h>
#include <string.h>
#include <windows.h>
BOOL CALLBACK EnumFunc(HWND hwnd,LPARAM lParam);
BOOL CALLBACK EnumChildFunc(HWND hwnd,LPARAM lParam);
int main(int argc, char *argv[])
{
LPARAM lParam = 0;
EnumWindows(EnumFunc,lParam);
system("PAUSE");
return 0;
}
#include <iostream.h>
BOOL CALLBACK EnumFunc(HWND hwnd,LPARAM lParam)
{
static int count = 0;
LPTSTR pszFileName = new char [100];
GetWindowText(hwnd,pszFileName,100);
cout<<"main hwnd"<<count++<<": "<<hwnd<<" "<<pszFileName<<endl
EnumChildWindows(hwnd,EnumChildFunc,lParam);
system("pause");
return true;
}
BOOL CALLBACK EnumChildFunc(HWND hwnd,LPARAM lParam)
{
static int count = 0;
LPTSTR pszFileName = (LPTSTR) new char [250];
GetWindowText(hwnd,pszFileName,250);
cout<<" child hwnd "<<hwnd<<count++<<": "<<pszFileName<<endl;
return true;
}
#include <string.h>
#include <windows.h>
BOOL CALLBACK EnumFunc(HWND hwnd,LPARAM lParam);
BOOL CALLBACK EnumChildFunc(HWND hwnd,LPARAM lParam);
int main(int argc, char *argv[])
{
LPARAM lParam = 0;
EnumWindows(EnumFunc,lParam);
system("PAUSE");
return 0;
}
#include <iostream.h>
BOOL CALLBACK EnumFunc(HWND hwnd,LPARAM lParam)
{
static int count = 0;
LPTSTR pszFileName = new char [100];
GetWindowText(hwnd,pszFileName,100);
cout<<"main hwnd"<<count++<<": "<<hwnd<<" "<<pszFileName<<endl
EnumChildWindows(hwnd,EnumChildFunc,lParam);
system("pause");
return true;
}
BOOL CALLBACK EnumChildFunc(HWND hwnd,LPARAM lParam)
{
static int count = 0;
LPTSTR pszFileName = (LPTSTR) new char [250];
GetWindowText(hwnd,pszFileName,250);
cout<<" child hwnd "<<hwnd<<count++<<": "<<pszFileName<<endl;
return true;
}