Wider Characters
typedef unsigned short wchar_t ;
wchar_t c = `A' ;
wchar_t * p =
L"Hello!" ;
static wchar_t a[] = L"Hello!" ;
wchar_t c = L'A' ;
Wide-Character Library Functions
wchar_t * pw = L"Hello!" ;
size_t __cdecl wcslen (const wchar_t *)
;
iLength = wcslen (pw) ;
If an identifier named _UNICODE is defined and the TCHAR.H header file is included in your program, _tcslen is defined to be wcslen:
#define _tcslen wcslen
typedef wchar_t TCHAR ;
#define __T(x) L##x
#define __T(x) x
If UNICODE isn't defined, _tcslen is defined to be strlen:
#define _tcslen strlen
typedef char TCHAR ;
#define _T(x) __T(x)
#define _TEXT(x) __T(x)
_TEXT ("Hello!")
winnt.h
typedef char CHAR ;
typedef wchar_t WCHAR
; // wc
Windows' String function
ILength = lstrlen (pString) ;
pString = lstrcpy (pString1, pString2)
;
pString = lstrcpyn (pString1, pString2, iCount) ;
pString = lstrcat
(pString1, pString2) ;
iComp = lstrcmp (pString1, pString2) ;
iComp =
lstrcmpi (pString1, pString2) ;
ASCII | Wide-Character | Generic | |
Variable Number
of Arguments | |||
Standard Version | sprintf | swprintf | _stprintf |
Max-Length Version | _snprintf | _snwprintf | _sntprintf |
Windows Version | wsprintfA | wsprintfW | wsprintf |
Pointer to Array
of Arguments | |||
Standard Version | vsprintf | vswprintf | _vstprintf |
Max-Length Version | _vsnprintf | _vsnwprintf | _vsntprintf |
Windows Version | wvsprintfA | wvsprintfW | wvsprintf |
from Programming Windows, Fifth Edition (Charles
Petzold)
'프로그래밍' 카테고리의 다른 글
[펌 FAT16의 FAT구조 File Allocation Table (0) | 2006.07.20 |
---|---|
[스크랩] 압축률이 얼마인가요? (0) | 2006.04.15 |
[스크랩] 웹서버를 이용한 FLV 스트리밍 (0) | 2006.04.15 |
Web 2.0 AJAX(Asynchronous JavaScript Technology and XML) (0) | 2006.02.03 |
Visual studio 2005에서 Win32API를 빌드시 링크에러 대처 방법 (0) | 2006.02.01 |