A window of an application can associate its window handle to an input context to maintain any status of IME, including the intermediate composition string. Once an application associates an input context to a window handle, the system automatically selects the context whenever the window is activated. Using this feature, an application can be free from the complicated in-out focus processing that was necessary under Windows version 3.1.