使用SDK总是比较烦琐,自己对WTL/ATL又不熟,特来问问。

解决方案 »

  1.   

    对文件操作,有API好用的,而且功能强大。
      

  2.   

    i recommand you to use IStream  with replace STL fstream.
      

  3.   

    to  LeighSword(Sword) :你说的CAtlFile在哪个文件里呀。
      

  4.   

    CAtlFile ClassSee Also
    Marquee Sample | MantaWeb SampleClass Members | ATL Class Overview | CHandle
    Requirements
    Header: atlfile.h
    This class provides a thin wrapper around the Windows file-handling API.class CAtlFile : public CHandle
    Res
    Use this class when file-handling needs are relatively simple, but more abstraction than the Windows API provides is required, without including MFC dependencies.Requirements
    Header: atlfile.h
      

  5.   

    atlfie..h?
    这个文件是在哪?我在Visual C++6.0和WTL7.0下都没找到。
      

  6.   

    是啊,我也没有找到这个头文件
    我觉得在ATL中也可用VC中的CFile这个类
    只要你的ATL支持MFC就可以了
      

  7.   

    Why doesn't use vs.net, must is native C++(non-MC++) with when the code release only must msvcr6.Dll and msvcp6.Dll replaces msvcr7x.Dll and msvcp7x.Dll, but I think in ATL uses MFC is not the ATL original intention that make components as fast as small as possible.
      

  8.   

    WTL是为了封装Window API 没有这些东西
      

  9.   

    没有,WTL不支持
    我用 FILE * fp;
    fopen,fread,fwrite等
      

  10.   

    C++标准模板库中,头文件<fstream>定义了ifstream和ofstream