2010-03-04 12:30:01 UTC
I’m creating a virtual keyboard that works in Korea and I’m having one
From the beginning, I created a basic app and this works for every other
language other than Korea. If you type the letters DKS via keyboard it
constructs a single character, but if you try this using my app, it breaks
the characters up.
I can only assume this was down to focus and I spent a long time reviewing
messages from various apps/system but I can’t see anything obvious.
Following message trail comes out when you use the actual keyboard:
WM_KEY_DOWN – VK_PROCESSKEY , for the first character
WM_IME_STARTCOMPOSITION - IME kicks in and starts the composition process
WM_KEY_UP … for the first character
WM_KEY_DOWN VK_PROCESSKEY, for the second character
WM_IME_NOTIFY/COMPOSITION – updating the contents/IME window
WM_KEY_UP … for the second character
If I try this via the virtual keyboard, it suddenly appears with WM_KEY_UP –
VK_PROCESSKEY with a zero scan code.
This tears down the IME composition stopping character construction.
I’ve no idea where this KEY_UP code is coming from as it certainly isn’t my
At first I thought I started off with the usual suspects by:
1) Altering the window construct (CreateParams) and adding WS_EX_NOACTIVATE
2) I also picked up on the WM_MOUSEACTIVATE command and respond with
This helped the keyboard work for all other systems, except Korean.
The only way I can get this to work is code a MFC Dialog app with ‘No
Activate’ switched on within the Dialog.
This is nice to know, but I’m hoping someone out there can explain or
provide a solution?