글쓴이: 익명 사용자 / 작성시간: 일, 2017/07/23 - 8:16오후
wchar_t tt2[] = L"مرحباِ";
TextOutW(h_dc, 0, 0, tt2, 7);
char tt[] = "مرحباِ";
TextOutA(h_dc, 0, 20, tt, 7);
2바이트 크기 문자는 출력이 잘되는데
4바이트 크기의 문자는 출력이 안되더군요..
웹브라우저에 출력되는걸 보면 뭔가 방법이 있을것 같은데
혹시 아시는분 답변 좀 부탁드립니다..
참고해보세요.
//
해결 하시려면. 검색 하시면. 블로그에 관련된 예제 소스가 있을겁니다.
TextOutW 로 구글 검색
TextOutA 로 구글 검색
책 예제 소스 보셔도 됩니다.
이거 관련 내용은 검색하지 않았습니다.
//
대신. 각 함수와 변수에 대한. 장황한. 검색 내용을 적어봅니다.
//
TCHAR 는
UNICODE 가 #define 되어 있으면 WCHAR 이고.
다른 경우 (ANSI?) 면 CHAR (8비트==1바이트)를 사용합니다.
WCHAR 는 wchar_t 이고. 16비트 (2바이트) 입니다.
//
WCHAR
https://msdn.microsoft.com/en-us/library/gg269344(v=exchg.10).aspx
#if !defined(_NATIVE_WCHAR_T_DEFINED)
typedef unsigned short WCHAR;
#else
typedef wchar_t WCHAR;
#endif
//
char, wchar_t, char16_t, char32_t
https://msdn.microsoft.com/ko-kr/library/mt228149.aspx
//
TextOut function
https://msdn.microsoft.com/ko-kr/library/windows/desktop/dd145133(v=vs.85).aspx
//
Windows Data Types
https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751
//
WCHAR
A 16-bit Unicode character. For more information, see Character Sets Used By Fonts.
This type is declared in WinNT.h as follows:
typedef wchar_t WCHAR;
//
Tchar.h의 제네릭 텍스트 매핑
https://msdn.microsoft.com/ko-kr/library/c426s321.aspx
//
TCHAR
A WCHAR if UNICODE is defined, a CHAR otherwise.
This type is declared in WinNT.h as follows:
C++
#ifdef UNICODE
typedef WCHAR TCHAR;
#else
typedef char TCHAR;
#endif
//
CHAR
An 8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts.
This type is declared in WinNT.h as follows:
typedef char CHAR;
//
WinAPI
http://soen.kr/
----------------------------------------------------------------------------
젊음'은 모든것을 가능하게 만든다.
매일 1억명이 사용하는 프로그램을 함께 만들어보고 싶습니다.
정규 근로 시간을 지키는. 야근 없는 회사와 거래합니다.
각 분야별. 좋은 책'이나 사이트' 블로그' 링크 소개 받습니다. shintx@naver.com
댓글 달기