Hello, im currently using keybd_event...
I want it to send it to a specific window. Like a macro program
So far I have it sending keys to whatever window is on top, thats cool and all and it works, which matters to me a lot.
But with keybd_event can I set it to a specific window?
EXAMPLE of Presenet:
I have my consule application running
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int end_program;
int i;
while(i<1000)
i++;
i = 0;
keybd_event(VK_TAB,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
while(i<5) {
keybd_event(66,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
keybd_event( 66,
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
i++;
}
keybd_event(VK_RETURN,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
scanf("%d",&end_program);
if (end_program == 1)
return EXIT_SUCCESS;
}
Pretty simple, NOW when i run it whatever window is on top gets the keys sent to it
How do I make it so any window can be on top, yet it will send the keys to a specific application?
BOT77