send a message to a window from within a WH_KEYBOARD_LL hook
I understood it's hard to convert a WH_KEYBOARD_LL messag开发者_运维百科e to it's corresponding unicode character if the user has set a keyboard layout like Chinese , but I still want to finish my multilingual app. As I mention in the original question it's not important why I use a WH_KEYBOARD_LL hook , I tried other stuff and this is what works best for my app.
Q: Who can I send the WH_KEYBOARD_LL message cot inside my hook proc to another window then it was originally destined? The risen for doing this is (as mentioned in the original question's answer 3 ) if I send this message to a window containing an edit box maybe this will convert it in the write unicode char and I can get it from there.
The answer on the "How to convert a message from a WH_KEYBOARD_LL to corespondig unicode char" question was basically "Even geniuses like Mike Kaplan cannot do this, you shouldn't even try".
If you are writing an IME, the answer is "you have to do all of this work yourself - that is the job of an IME".
If you are not writing an IME, the answer is "use the IME".
- http://msdn.microsoft.com/en-us/library/aa912526.aspx
Perhaps if you tell us what your program does (and why you can't just use the user's IME) we can come up with a better way to do it!
精彩评论