Pessoal, estou tentando criar um keylogger (mais para estudo mesmo). Ele já está capturando as teclas tranquilamente, porém quero saber também em qual janela aquilo foi digitado. Podem me ajudar? Sou novato em C/C++, uso o Dev-C++
![Sorridente](https://forum.guiadohacker.com.br/images/smilies/biggrin.png)
![Sorridente](https://forum.guiadohacker.com.br/images/smilies/biggrin.png)
![Sorridente](https://forum.guiadohacker.com.br/images/smilies/biggrin.png)
#include <stdio.h> #include <windows.h> int main() { HWND janela; LPSTR nome; janela = GetForegroundWindow(); printf("Janela Atual: %s\n", GetWindowText(janela, nome, 255)); system("pause"); return 0; }
#include <stdio.h> #include <windows.h> int main() { HWND janela; LPSTR nome; janela = GetForegroundWindow(); printf("Janela Atual: %s\n", GetWindowText(janela, nome, 255)); system("pause"); return 0; }
#include <stdio.h> #include <windows.h> int main() { HWND janela; char nome[256]; janela = GetForegroundWindow(); if(janela) { GetWindowText(janela, nome, 256); printf("Janela: %s\n", nome); } return 0; }
Comment