Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionHWND temp=GetWindow(GetForegroundWindow(), GW_HWNDFIRST); LPTSTR str=(LPTSTR)LocalAlloc(0,90); while(temp) { if(IsWindowVisible(temp)) { GetWindowText(temp,str,90); std::cout<<"""<<str<<""\n"; } temp=GetWindow(temp,GW_HWNDNEXT); } LocalFree((LPVOID)str);
BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM lParam) { if(IsWindowVisible(hwnd)) { LPTSTR str=(LPTSTR)LocalAlloc(0,90); GetWindowText(hwnd,str,90); std::cout<<"""<<str<<""\n"; LocalFree((LPVOID)str); } return TRUE; } void TestEnumWindows() { EnumWindows(EnumWindowsProc,0); }