/// <summary> /// Enable the IME /// </summary> public void EnableIME() { IsEnabled = true; if (_context != IntPtr.Zero) { IMM.ImmAssociateContext(Handle, _context); return; } // This fix the bug that _context is 0 on fullscreen mode. ImeContext.Enable(Handle); }
/// <summary> /// Enable the IME /// </summary> public void EnableIME() { IsEnabled = true; IMM.DestroyCaret(); IMM.CreateCaret(Handle, IntPtr.Zero, 1, 1); _context = IMM.ImmGetContext(Handle); if (_context != IntPtr.Zero) { IMM.ImmAssociateContext(Handle, _context); IMM.ImmReleaseContext(Handle, _context); return; } // This fix the bug that _context is 0 on fullscreen mode. ImeContext.Enable(Handle); }