IME masking and full half-width switching

Source: Internet
Author: User

Today in the process of work encountered in the Edit and ComboBox can only enter the number (full-width number is also allowed), do not want to pass the full half-angle conversion, only from the input method to start.

Check the relevant information to get the following methods:

1. The entire window disables the input method (the following process is disabled):

Immdisableime (GetCurrentThreadID ());

2. IME disables full-width mode:

HIMC HIMC;
DWORD Dwconvmode, Dwsentmode;
HIMC = Immgetcontext ("Handle with parameter disabled");
Immgetconversionstatus (HIMC, &dwconvmode, &dwsentmode);
Immsetconversionstatus (HIMC, Dwconvmode & ~ime_cmode_fullshape, Dwsentmode); Take the full-width mode;

3. Input method is disabled directly (disabled for the specified handle)

CEdit *pedit = (cedit*) m_combobox.      GetWindow (Gw_child); Gets the handle to the edit box in the ComboBox;
if (PEdit)
{
:: Immgetcontext (Pedit->getsafehwnd ());
Immassociatecontext (Pedit->getsafehwnd (), NULL);
}

IME masking and full half-width switching

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.