im tryign to send a key to the active window it just doesnt seem to be working
Code:#include <windows.h>
#include <Winuser.h>
int main()
{
while ( 1 == 1) {
HWND Window;
Window = GetActiveWindow();
SendMessage(Window, WM_KEYDOWN, VkKeyScan('c'), 0);
SendMessage(Window, WM_CHAR, VkKeyScan('c'), 0);
SendMessage(Window, WM_KEYUP, VkKeyScan('c'), 0);
Sleep(1000);
}
}