fork download
  1. #include <iostream>
  2. #include <windows.h>
  3.  
  4. BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lparam)
  5. {
  6. LPTSTR title = 0;
  7.  
  8. GetWindowText(hwnd, title, sizeof(title));
  9. std::cout << "Window Name: " << std::endl;
  10.  
  11. return true;
  12. }
  13.  
  14. int main(int argc, char* argv[])
  15. {
  16. EnumWindows(EnumWindowsProc, NULL);
  17.  
  18. std::cin.get();
  19. return 0;
  20. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty