I want to type Korean text in my editable area inside a WinForms application.
But Characters are repeating, I have tried to override the default WndProc
, but nothing working.
switch (m.WParam.ToInt32())
{
case Common.Interop.Window.WM_IME_CHAR:
break;
case Common.Interop.Window.WM_IME_ENDCOMPOSITION:
PassCharToScreen(m);
break;
case Common.Interop.Window.WM_CHAR:
PassCharToScreen(m);
break;
case Common.Interop.Window.WM_IME_NOTIFY:
break;
case Common.Interop.Window.WM_IME_COMPOSITION:
PassCharToScreen(m);
break;
case Common.Interop.Window.WM_IME_COMPOSITIONFULL:
break;
When I type in English, breakpoint hits WM_CHAR
, But When I type in Korean it hits WM_IME_COMPOSITION
on first character, and then after first character it hits WM_IME_COMPOSITION
first and then hit WM_CHAR
.
I have observed that it types the first character correctly. e.g. ㅁ (Korean Character) On typing second character. ㅁㅂㅁ (First char, second char, first char). I want the behaviour as it is in notepad