CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): concerto (#2/1)
날 짜 (Date): 2003년 8월 22일 금요일 오후 02시 43분 29초
제 목(Title): Re: [재차질문]VC에서 타입 변환에 대해...


tchar.h에서 _UNICODE를 define하냐 안하냐에 따라
TCHAR는 wchar_t(UNICODE)로 char(ANSI)로 될 수 있습니다.

그리고, 말씀하진 lstrcpyW는 directx api더군요. unicode string copy 
routine은 wcscpy입니다. sting.h를 열어 보면, wcs로 시작하는 함수들이
unicode string manipulation 함수들입니다.

visual studio\vc98\include\tchar.h를 참조하시고, 다음 설명을 읽어 보세요.

Code that includes explicit calls to either the str functions or the
wcs functions cannot be compiled easily for both ANSI and Unicode.
To set up the dual capability, you include the tchar.h file instead
of including string.h.
                                             
tchar.h exists for the sole purpose of helping you create ANSI/Unicode
generic source code files. It consists of a set of macros that you
should use in your source code instead of making direct calls to either
the str or the wcs functions. If you define _UNICODE when you compile
your source code, the macros reference the wcs set of functions. If you
don't define _UNICODE, the macros reference the str set of functions.

                
예로 _UNICODE를 define하냐 안하냐에 따라
                
_tcscpy(TCHAR*, TCHAR*)이 unicode에 맞게(wcscpy(wchar_t*, wchar_t*) ),
아니면 ANSI에 맞게(strcpy(char*, char*) ) macro에 의해 변경됩니다.



 사랑은 아무나 하나...
 어느 누가 쉽다고 했나...


[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.