views:

70

answers:

1

I am making an app that simulates a keyboard. I will do it by sending WM_KEYDOWN to a window, but I am not sure where to send the message. to the currently active window or to HWND_BROADCAST?

Here is an other question I posted, related to this one.
http://stackoverflow.com/questions/2089968/if-i-send-a-wmkeydown-message-using-wndproc-will-the-computer-hold-the-key-dow

A: 

If make a generic virtual keyboard and not worry about which window is active (which is the window manager's business), you can use SendInput: http://msdn.microsoft.com/en-us/library/ms646310(VS.85).aspx

Andrew Medico