~cpp void ToggleKeyMap { HIMC himc; himc = ImmGetContext(GetDlgItem(IDC_MYEDIT)->m_hWnd); DWORD dwConversion, dwSentence; ImmGetConversionStatus(himc, &dwConversion, &dwSentence); BOOL bChangedHangulMode = (dwConversion==IME_CMODE_ALPHANUMERIC); if( bChangedHangulMode ) ImmSetConversionStatus(himc, IME_CMODE_NATIVE, dwSentence); else ImmSetConversionStatus(himc, IME_CMODE_ALPHANUMERIC, dwSentence); }