直接用C 的FILE * pF 就可以

解决方案 »

  1.   

    我喜欢用CFile类。有很多集成的函数,你可以很方便的使用。
      

  2.   

    CFile f;
    CString f_name; //UpdateData(TRUE);
    f_name.Format("..\\birthday.txt");

    f.Open(f_name,CFile::modeCreate|CFile::modeNoTruncate|CFile::modeRead);
    ....
    ....
    //你的操作
    f.Close();
      

  3.   

    CreateProcess("c:\\windows\\system\\notepad.exe","wordpad help.txt",.....)
      

  4.   

    如果是用MFC,这样的话还不如用CStdioFile类
      

  5.   

    你是想把文本文件作为帮助打开吧,不如在程序中运行记事本直接打开文本文件即可。
    可用ShellExecute或ShellExecuteEx:
        ShellExecute(m_hWnd,"open",notepadpathname,lpParameters,NULL,SW_SHOWNORMAL);