No older revisions available
No older revisions available
(윈도우즈 프로그래밍) 한글/영문 토글하기 ¶
IME 이용 ¶
- 헤더파일 : windows.h, imm.h
- 라이브러리 : imm32.lib
~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);
}