各位老师,c语言中如下代码有两个顶层窗口如何编译呢?
各位老师,c语言中如下代码有两个顶层窗口如何编译呢?如"窗口5.0""窗口6.0"?谢谢老师了int Pnum = 0, Cnum;//父窗口数量,每一级父窗口的子窗口数量
bool CALLBACK EnumChildWindowsProc(HWND HwndChild, LPARAM lparam)
{
char Str;
Cnum++;
GetWindowText(HwndChild, Str, 255);
printf("%s\n",Str);
return TRUE;
}
int main()
{
HWND H = FindWindow(NULL, "窗口5.0");
HWND H1 = FindWindow(NULL, "窗口6.0");
EnumChildWindows(H, (WNDENUMPROC)EnumChildWindowsProc, NULL);
// EnumChildWindows(H1, (WNDENUMPROC)EnumChildWindowsProc, NULL);
getchar();
return 0;
}
页:
[1]