/*
// 아래는 유니코드(한글)지원의 파일 쓰기의 예다.
// http://sis6789.blog.me/10083138352
char* pLocale = setlocale(LC_ALL, "Korean"); // 이 코드를 쓰면 한글이 인식된단다 (개소리로 증명됨)
FILE *fStream;
errno_t e = _tfopen_s(&fStream, tcFilePathNameEx, _T("wt,ccs=UNICODE"));
if (e != 0)
return; // failed..
CStdioFile f(fStream); // open the file from this stream
f.WriteString(_T("심심해요 힝 n심심해 힝"));
f.Close();
*/
/*
// 아래는 유니코드(한글)지원의 파일 읽기의 예다.
// 변수 선언
CString csEOF(L"EOF"); // 파일의 끝을 인식시키는 장치
CString csTemp; // 파일 내용을 한줄씩 담아옴
// 파일의 위치를 추적함
char* pLocale = setlocale(LC_ALL, "Korean"); // 이 코드를 쓰면 한글이 인식된단다 (개소리로 증명됨)
FILE *fStream;
errno_t e = _tfopen_s(&fStream, tcFilePathNameEx, _T("r,ccs=UNICODE"));
if (e != 0)
return; // 파일 위치 인식 실패
// 파일 내용 긁어오기
CStdioFile file(fStream);
// 한줄씩 내려간다
while(1)
{
file.ReadString(csTemp);
AfxMessageBox(csTemp);
if(csEOF==csTemp)
{
AfxMessageBox(L"End of File");
break;
}
}
file.Close();
*/
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
공지 | [API] 기초 코드 | simpled | 2013.06.23 | 9796 |
» | [MFC] 한글 파일 입출력 | simpled | 2013.06.24 | 9990 |
66 | [MFC] 한글 파일 출력 | simpled | 2013.06.24 | 7149 |
65 |
[API] 발표 자료
![]() | simpled | 2013.06.23 | 6555 |
64 |
[API] Drag&Drop2
![]() | simpled | 2013.06.23 | 6491 |
63 |
[API] 기말 과제
![]() | simpled | 2013.06.23 | 7104 |
62 | [API] 프로젝트 경로 리턴 함수 (비공개) | simpled | 2013.06.23 | 6814 |
61 | [API] 파일 조작 관련된 좋은 함수들 | simpled | 2013.06.23 | 6518 |
60 |
[API] Drag&Drop
![]() | simpled | 2013.06.23 | 6787 |
59 |
[API] 로딩 화면(팝업(popup)) 완성 - 2
![]() | simpled | 2013.06.23 | 6051 |
58 |
[API] 로딩 화면(팝업(popup)) 완성 - 1
![]() | simpled | 2013.06.23 | 6069 |
57 |
[API] 로딩 화면(팝업(popup)) 기획
![]() | simpled | 2013.06.23 | 6389 |
56 |
[API] 제목 표시줄 없애기
![]() | simpled | 2013.06.23 | 6571 |
55 | [API] Alt+F4 막기 | simpled | 2013.06.23 | 7290 |
54 |
[API] Project : SimplePaint v4.0
![]() | simpled | 2013.06.23 | 6200 |
53 |
[API] Project : SimplePaint v1.0
![]() | simpled | 2013.06.23 | 6795 |
52 |
[API] DialogBox
![]() | simpled | 2013.06.23 | 6929 |
51 | [API] Static | simpled | 2013.06.23 | 6353 |
50 | [API] ScrollBar | simpled | 2013.06.23 | 6322 |
49 |
[API] ComboBox
![]() | simpled | 2013.06.23 | 6835 |
48 |
[API] ListBox
![]() | simpled | 2013.06.23 | 7465 |