출처 : http://leechen.wzsoft.com/ 이 사이트의 <이하늘> 님이 쓰신 글
IME(한영전환)
영문 모드로 바꾸기
HIMC hIMC;
DWORD dwConversion;
DWORD dwSentence;
if( !(hIMC = ImmGetContext( GetActiveWindow() ) ) )
return;
ImmGetConversionStatus( hIMC, &dwConversion, &dwSentence);
if(dwConversion & IME_CMODE_HANGEUL) // 한글모드면...
dwConversion -= IME_CMODE_HANGEUL;
ImmSetConversionStatus( hIMC, IME_CMODE_ALPHANUMERIC, IME_SMODE_NONE);
ImmReleaseContext( GetActiveWindow(), hIMC );
한글 모드로 바꾸기 :
HIMC hIMC;
DWORD dwConversion;
DWORD dwSentence;
if( !(hIMC = ImmGetContext( GetActiveWindow() ) ) )
return;
ImmGetConversionStatus( hIMC, &dwConversion, &dwSentence);
ImmSetConversionStatus( hIMC, dwConversion | IME_CMODE_HANGEUL, IME_SMODE_NONE);
ImmReleaseContext( GetActiveWindow(), hIMC );
한영 토클시키기
HIMC hIMC;
DWORD dwConversion;
DWORD dwSentence;
if( !(hIMC = ImmGetContext( GetActiveWindow() ) ) )
return;
ImmGetConversionStatus( hIMC, &dwConversion, &dwSentence);
if(dwConversion & IME_CMODE_HANGEUL) //한글 모드면
dwConversion -= IME_CMODE_HANGEUL;
else
dwConversion = dwConversion | IME_CMODE_HANGEUL;
ImmSetConversionStatus( hIMC, dwConversion, dwSentence);
ImmReleaseContext( GetActiveWindow(), hIMC );
반각문자 입력모드
HIMC hIMC;
DWORD dwConversion;
DWORD dwSentence;
if( !(hIMC = ImmGetContext( GetActiveWindow() ) ) )
return;
ImmGetConversionStatus( hIMC, &dwConversion, &dwSentence);
if(dwConversion & IME_CMODE_FULLSHAPE) //전각 모드면
dwConversion -= IME_CMODE_FULLSHAPE;
ImmSetConversionStatus( hIMC, dwConversion, dwSentence);
ImmReleaseContext( GetActiveWindow(), hIMC );
전각문자 입력모드
HIMC hIMC;
DWORD dwConversion;
DWORD dwSentence;
if( !(hIMC = ImmGetContext( GetActiveWindow() ) ) )
return;
ImmGetConversionStatus( hIMC, &dwConversion, &dwSentence);
ImmSetConversionStatus( hIMC, dwConversion | IME_CMODE_FULLSHAPE, dwSentence);
ImmReleaseContext( GetActiveWindow(), hIMC );
'게임 개발' 카테고리의 다른 글
코드 최적화에 대한 Tip (0) | 2005.10.28 |
---|---|
풀화면에서 Dialog띠우기 팁 입니다. (DX9.0) (0) | 2005.10.27 |
메모리 누수 잡기 (0) | 2005.10.25 |
ftp 서버 만들기 2장 (0) | 2005.09.13 |
C++사이트 링크 (0) | 2004.07.30 |