Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- int main()
- {
- char wlist[][100] = { "Gerenciador de Processos", "Calculadora" };
- int cnt = sizeof(wlist) / sizeof(*wlist);
- for (int i = 0; i <= cnt; i++){
- HWND janela = FindWindow(NULL, wlist[i]);
- if (janela == 0){
- printf("%s esta fechado\n", wlist[i]);
- }
- else{
- printf("%s esta aberto\n", wlist[i]);
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment