void SetHanMode(HWND hWnd,BOOL isHan)
{
// hWnd : 상태를 변경할 윈도 핸들
// isHan : 한글로 전환할지..
HIMC hIMC = ImmGetContext(hWnd);
DWORD dwConv, dwSent;
DWORD dwTemp;
ImmGetConversionStatus(hIMC,&dwConv,&dwSent);
if(isHan){
dwTemp = dwConv & ~IME_CMODE_LANGUAGE;
dwTemp |= IME_CMODE_NATIVE;
dwConv = dwTemp;
}else dwConv=0;
ImmSetConversionStatus(hIMC,dwConv,dwSent);
ImmReleaseContext(hWnd,hIMC);
}
{
// hWnd : 상태를 변경할 윈도 핸들
// isHan : 한글로 전환할지..
HIMC hIMC = ImmGetContext(hWnd);
DWORD dwConv, dwSent;
DWORD dwTemp;
ImmGetConversionStatus(hIMC,&dwConv,&dwSent);
if(isHan){
dwTemp = dwConv & ~IME_CMODE_LANGUAGE;
dwTemp |= IME_CMODE_NATIVE;
dwConv = dwTemp;
}else dwConv=0;
ImmSetConversionStatus(hIMC,dwConv,dwSent);
ImmReleaseContext(hWnd,hIMC);
}
반응형