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 development | Windows API - Win32
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C++
Developer technologies | 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.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Xiaopo Yang - MSFT 12,736 Reputation points Microsoft External Staff
    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.