Hello.
My customers have pocketpc 2003 korean version and 3rd party external
keyboard. But problem exists. Because customers use korean language,
they may have to change IMM input mode-korean or english input mode.
On the screen, there is toggle button. But I can't find the any
external keyboard input for that - somthing like kor/eng toggle
button.
For windows, there is kor/eng toggle button, and it works. If adequate
keyboard driver which is provided by MS is selected, we can change the
input mode by pressing "Shift + Space".
For the external keyboard, there is no kor/eng button, so I'd like to
emulate the button using something like "Shift+Space" or any other
key. I also tested kor/eng button in my PC keyboard using PPC
emulator, and it doesn't work.
I must find the way for customers...so I've tried to make some
program. At the first time, I think about keyboard hooking and luckily
there is hidden function in PocketPC 2003. And I wrote down the code
below.
-----------------------------------------------------
hLibrary = LoadLibrary(L"coredll.dll");
if(hLibrary == NULL)
{
return 0;
}
else
{
m_pfSetWindowsHook = (SetWindowsHookExW)GetProcAddress(hLibrary,
L"SetWindowsHookExW");
if(m_pfSetWindowsHook == NULL)
{
return 0;
}
else
{
HHOOK gHook = m_pfSetWindowsHook(WH_KEYBOARD_LL, (HOOKPROC)
MainWndProc, hInstance, 0);
}
}
-------------------------------------------------------
The hooking seems to works but not perfectly. Because I can get the
keyboard messages but the wparam and lparam value is fixed and
meaningless. How to get the keyboard information precisely?
And I'd like know how to toggle the IMM input mode. For my experience,
the IMM input mode is set for the applications respectively. How to
change the IMM for the currently activated program, not the helper
program(what I want to make).
I think Pocket PC 2003 OS must support the kor/eng toggle key.
If you know any work-around such as using hot-key or others, please
let me know that.
Thank you.
Best Regards,
Hojae Lee