Notice
Recent Posts
Recent Comments
Link
«   2025/12   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

Stackcat's Blog

CString to CFile 본문

프로그래밍/C, C++, MFC, Win API....

CString to CFile

Stackcat 2018. 6. 4. 16:18
CFile file;
WORD wd = 0xFEFF;            // Unicode 식별자
file.Open(_T("C:\\kyt_test\\[AD]Policy_List.txt"), CFile::modeWrite|CFile::typeBinary);
file.Write(&wd, 2);               // 문서 맨 앞에 Unicode라고 써준거라고 생각하면 됨.
	
CString strTemp; strTemp.Format(_T("%s\r\n"),mpIter->first);  // mpIter : map
file.Write(strTemp, strTemp.GetLength()*sizeof(TCHAR));              // Length * sizeof(TCHAR) 

file.Close();

'프로그래밍 > C, C++, MFC, Win API....' 카테고리의 다른 글

CRichEditCtrl Encoding Error  (0) 2018.06.04
UTC String to Local Time  (1) 2018.06.04
Read File Encoding Error  (0) 2018.06.04
Comments