Stackcat's Blog
CString to CFile 본문
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