I want to make a virtual keyboard. Do I need to send WM_KEYDOWN to the current active window or HWND_BROADCAST?
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.
If I send a WM_KEYDOWN message (using wndproc) will the computer hold the key down until I send WM_KEYUP?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
精彩评论