A UI window can register and show the composition window and the status window by referring to the current input context. The class style of the components of the UI window must include CS_IME. A window instance of the UI window receives information such as the composition string, font, position and so on from the current input context. When a window of the application is getting focus, the system receives the input context that is owned by the window and sets the current input context to the UI window. The system sends the WM_IME_SETCONTEXT message with the handle of its input context to the application, and the application passes this message to the UI window. If the current input context is replaced, the UI window should repaint the composition window. Whenever the current context changes, the UI window shows a correct composition window, and the status of IME can be assured.
A UI window may create its child windows or popup windows to show its status, composition string, or candidate lists. These windows must be owned window of the UI window and created as disabled windows. Any windows created by IME should not get the focus.