Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disabling default IME

313 views
Skip to first unread message

McEwen@discussions.microsoft.com Mike McEwen

unread,
Mar 1, 2007, 4:40:31 AM3/1/07
to

I want to programmatically disable the default IME while my application is
in focus.
Specifically I don't want it to catch keyboard presses, I want them to go
directly to my application.

I've already tried some things to disable it.

I've tried to get rid of it with -

ImmAssociateContext(hWnd, (HIMC)NULL);

but this doesn't fully disable it, it only partially goes away.

I've tried using "ImmDisableIME" but again this only partially disables it.

I've tried -

HWND hImeWnd = ImmGetDefaultIMEWnd(hWnd);
SendMessage(hImeWnd, WM_IME_CONTROL, IMC_CLOSESTATUSWINDOW, 0);

Which gets rid of the status window but the IME still grabs keyboard events.

There must be some recommended way to do this?
Anyone any idea what it is?

Michael S. Kaplan [MSFT]

unread,
Mar 1, 2007, 5:19:02 AM3/1/07
to
Did you try to switch to some other keyboard layout via
ActivateKeyboardLayout?

--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.

"Mike McEwen" <Mike McE...@discussions.microsoft.com> wrote in message
news:2A2539FD-1D53-4D22...@microsoft.com...

Mike McEwen

unread,
Mar 1, 2007, 7:03:00 AM3/1/07
to

"Michael S. Kaplan [MSFT]" wrote:

> Did you try to switch to some other keyboard layout via
> ActivateKeyboardLayout?

I haven't tried that but I don't see how that will help.
For example if the user has a chinese or japanese keyboard then what should
I switch it to?
If I switch it to something else then surely the physical keyboard won't
match the keyboard I have switched it to and so the user may press one key
and my application may get another key?

Also what happens to sequences like "contol space" which the IME may use to
switch state with? I want those key presses too.

The behaviour I want is similar to that of the mstsc. It seems to completely
disable the local IME so that it can send keyboard events to the remote end.
I want to disable the IME in a similar way.

Michael S. Kaplan [MSFT]

unread,
Mar 1, 2007, 11:00:33 AM3/1/07
to
I think perhaps you are actually wanting something different here -- more a
mode change to the Alpha" mode then disabling?

--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.


"Mike McEwen" <MikeM...@discussions.microsoft.com> wrote in message
news:E86A0DAE-DE71-4675...@microsoft.com...

0 new messages