EnumWindows/EnumChildWindows/ 枚举窗口 子窗口 调用实例

在msdn中查到了 这4个函数之间的关系,可惜只有VB代码,只能费一点时间将其转化为VC代码,再继续研究。

 

执行的顺序如下

EnumWindows----EnumWindowsProc----EnumChildWindows----EnumChildProc----

 

执行完毕后将结果输入到data.txt文件当中。 

 

 

/* 连城制作 QQ:173661967 */ #include #include fstream tfile("data.txt",ios::in|ios::out); BOOL CALLBACK EnumChildProc(HWND hwnd,LPARAM lParam) { CHAR NAME[255]; LPTSTR lpString=NAME; LPTSTR lpClassName=NAME; INT nMaxCounte=255; GetWindowText(hwnd,lpString,nMaxCounte); tfile<<"。。子窗口名:"<

你可能感兴趣的:(windows,api,学习心得)