I've been dealing with the task of sending fake keystrokes from my process to windows of other processes. I can send messages such like minimize or close. But when i try to send WM_KEYDOWN or WM_CHAR messages to microsoft programs (notepad is the one i've been working with), nothing happens!!!!
Found a thread in this forum (2002) which tries to solve it, but no solution appears.
So, I've done a little program to show messages so that i can send exactly the same messages, with the same wParam and lParam than Windows do when a key is pressed.
And think i found the following problem (hope sbdy could confirm):
When i send a message, it's sent directly to windowproc, while when a key is really pressed, it's sent to the messages loop (GetMessage(..) function) where it's translated, dispatched and whatever..
So, if, as i suspect, microsoft programs translate WM_KEYDOWN and/or WM_CHAR messages to another WM_USER+n message which is unknown for external users, i find myself with no more ideas to go on.... :S
Does anybody have some info about this?? Do i have to send keystrokes at a lower level??
Thanks in advance!!