본문 바로가기

먹고 사는 일/VC++

CString ASCII 변환 Key 찾기

 

CString을 한글자씩 잘라내 char* 로 변환 __toascii를 사용 ASCII로 변환

Key 13의 수량을 찾아 Enter key 를 확인한다.

 

CString strcomment;

 

for(int nSize = 0 ; nSize < strcomment.GetLength() ; nSize++)
 {
   CString strTemp = strcomment.Mid(nSize, 1);
   char* chrTemp;
   chrTemp = (LPSTR)(LPCTSTR)strTemp;
   int iAscii = __toascii(*(chrTemp));
   if(iAscii == 13)
    nCount = nCount+1;
 }

'먹고 사는 일 > VC++' 카테고리의 다른 글

CListctrl Report 에서 열간의 높이 조절 하는 방법  (0) 2009.10.08
System Millissecond  (0) 2009.08.20
CDC 배경 삭제 이미지  (0) 2009.07.28
CDC bitmap Image 사용  (0) 2009.07.28
프로세스 실행 경로  (0) 2009.06.23