I dont't know why ImmSetOpenStatus() not work in the lastest IME on Windows 11?

Tuan Le Hoang Anh 40 Reputation points
2023-09-21T08:55:32.1233333+00:00
 I use ImmSetOpenStatus() to open/close Input Method Editor (IME). ImmSetOpenStatus()  work correctly in previous version of IME in Windows 10. However, ImmSetOpenStatus() does not work in the lastest IME on Windows 11. May you tell the reason?
 

This is my code:

    if (status == FALSE) // Close IME

    {

        //turn off IME and conversion mode

        dwConversion = IME_CMODE_FULLSHAPE | IME_CMODE_ALPHANUMERIC;

        ImmSetConversionStatus(hIMC, dwConversion, 0);

        ImmSetOpenStatus(hIMC, FALSE);

    }

    else // Open IME

    {

        //set conversion mode

        switch (GetCurrentLanguageCode())

        {

        case JP:

            dwConversion = IME_CMODE_JAPANESE;

            ImmSetConversionStatus(hIMC, dwConversion, 0);

            ImmSetOpenStatus(hIMC, TRUE);

            break;

        case CN:

            dwConversion = IME_CMODE_CHINESE;

            ImmSetConversionStatus(hIMC, dwConversion, 0);

            ImmSetOpenStatus(hIMC, TRUE);

            break;

        case KR:

            dwConversion = IME_CMODE_ROMAN | IME_CMODE_FULLSHAPE | IME_CMODE_HANGUL;

            ImmSetConversionStatus(hIMC, dwConversion, 0);

            ImmSetOpenStatus(hIMC, TRUE);

            break;

        default:

            break;

        }

    }
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,461 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,300 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,582 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,686 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,426 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,721 Reputation points Microsoft Vendor
    2023-09-22T07:29:14.6133333+00:00

    Hello @Tuan Le Hoang Anh,

    I can reproduce using the halfime sample. You can Send feedback to Microsoft with the Feedback Hub app about the concern or open an incident at https://developer.microsoft.com/en-us/windows/support/?tabs=Contact-us if it has a big impact on you.

    For an incident, please choose the 'Desktop app UI development - Localization and Globalization API' for Windows SDK for this issue. In-addition, if the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.