I'm writing my own game in DirectX using C#. I'm at the point where I'm implementing my own textbox, written from scratch. It has the very basic functions for now, but works well. I want, however, to be able to input non-English text using Microsoft's IME (such as Japanese or Korean).

I've spent quite a lot of time looking for tutorials and documentations. I found a lot of functions (mainly contained in imm32.dll), but I can't really figure out how to make them work in order to make the input work:

my problem is that I can't use the IME inside my own textbox (contained in the DirectX Window form) as it is disabled. How do I tell the IME that my textbox can get input from keyboard and therefore get the IME enabled? Is there any method I should call?

I already tried stuff like ImmGetContext() and ImmAssociateContext(), using my window form as handle, but with no real results.


Browse other questions tagged or ask your own question.