keybd_event || SendInput
Posted on 2001-08-10
Hi guys, here's my problem.
I would like to make sure that SendInput() which I'm using to synthesise a particular key stroke, actually carries out that keystroke before moving on to the next line of code. For example
SendInput(...) //where I'm synthesing VK_DELETE
because I'm also handling WM_KEYUP messages, shouldn't SendInput() send a WM_KEYUP message immediately?
Instead, it carries out the lines of code AFTER SendInput(), and therefore seems to actually carry out the key press at the wrong time. It's almost as though it's working in a separate thread.
This is troublesome because the code after SendInput is depenedent on the key press being simulated first.
Has anyone got any ideas on how best to achieve my goal?
Oh, I get the same behaviour with keybd_event(...)