locked
How to display a IME text conversion window by using custome control?

    Question

  • I design a window by using DirectX, and  my purpose is when this window gets focus, a IME text conversion window can be display. How should I do this?

    How to display a internal IME text conversion window in code?

    Wednesday, August 29, 2012 7:11 AM

Answers

  • Your custom control needs to implement the TSF and UIA interfaces to act as a control.

    There is no way to bypass these interfaces to explicitly show the Keyboard or IME.

    Using the Xaml controls is a recommended alternate because they already implement these, so using them is much less complicated than writing your own control.

    --Rob

    • Marked as answer by Jesse Jiang Thursday, August 30, 2012 6:56 AM
    Wednesday, August 29, 2012 7:21 PM
    Owner

All replies

  • The IME communicates with the application via TSF, so if you need to receive input from the IME (or other advanced input such as spelling checks, type-ahead prediction, etc.) you will need to implement the  Text Services Framework (TSF) interfaces. We do not have any documentation or guidelines or samples on how exactly to do this beyond the TSF documentation linked.

    Your app will also need to implement the UI Automation interfaces to mark the custom text control as text. See the touch keyboard for information on this.

    If at all possible, I strongly recommend using Xaml text controls rather than trying to create your own as they implement both the UIA and TSF interfaces needed. See DirectX and Xaml Interop for information on how to use Xaml controls in your DirectX app.

    --Rob

    Wednesday, August 29, 2012 7:23 AM
    Owner
  •  Thanks for your quick response Rob!

     I mean when I get focus on a custome control, not textbox or other XAML text-based contorl, I don't need this control can recieve characters. I want to know is there a method like ShowIMEWindow() to let me do it? Thanks!

    Wednesday, August 29, 2012 7:43 AM
  • Your custom control needs to implement the TSF and UIA interfaces to act as a control.

    There is no way to bypass these interfaces to explicitly show the Keyboard or IME.

    Using the Xaml controls is a recommended alternate because they already implement these, so using them is much less complicated than writing your own control.

    --Rob

    • Marked as answer by Jesse Jiang Thursday, August 30, 2012 6:56 AM
    Wednesday, August 29, 2012 7:21 PM
    Owner
  • Thanks Rob!
    Thursday, August 30, 2012 1:45 AM