Guest User

Untitled

a guest
May 12th, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <Windows.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. char wlist[][100] = { "Gerenciador de Processos", "Calculadora" };
  10. int cnt = sizeof(wlist) / sizeof(*wlist);
  11. for (int i = 0; i <= cnt; i++){
  12. HWND janela = FindWindow(NULL, wlist[i]);
  13. if (janela == 0){
  14. printf("%s esta fechado\n", wlist[i]);
  15. }
  16. else{
  17. printf("%s esta aberto\n", wlist[i]);
  18. }
  19. }
  20.  
  21. system("pause");
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment