Module/WindowsMFC

atoi() _wtoi() 문자열안에서 "문자열"검색!

퓨림노 2008. 10. 7. 19:09


atoi() 함수는 ....
wtoi() 함수로 유니코드 문자를 숫자로 변환이 가능하다!

문자열  안에서 문자열 검색하는 함수!
wcsstr()

WCHAR *pTestBuffer, CardIndex[5];
POINT point;

 memset(TextBuffer, 0, sizeof(TextBuffer) ); 
 memset(CardIndex, 0, sizeof(CardIndex) );


if( wcsstr(TextBuffer, L"test MousePoint") != NULL) // 있음
   {
    pTestBuffer = TextBuffer+15; // 길이만큼
    wcscpy( CardIndex, pTestBuffer );
    
    point.x = _wtoi(CardIndex);

    pTestBuffer +=2;
    point.y = _wtoi(CardIndex);
   }