{{{#!gcode CString filename; filename.Format(_T("test.txt")); CFileException ex; CStdioFile file; //setlocale(LC_ALL, "korean"); if (!file.Open(filename, CFile::modeRead | CFile::typeText, &ex)) { TCHAR szError[1024] = {0,}; ex.GetErrorMessage(szError, 1024); CString msg; msg.Format(_T("파일 열기에 실패했습니다.\r\n\r\n%s"), szError); //D0(msg.GetBuffer(0)); return FALSE; } CString line; while (file.ReadString(line)) { // work something } file.Close(); }}} ---- {{{ }}}