我想使用Win32的SDK函数查找一类文件,例如仅给出扩展名,并且路径不确定
使用什么函数才能出现像MFC那样的文件列表,允许我手动查找?
不用MFC的类库文件(CFileDialog),谢谢。

解决方案 »

  1.   

    SearchPath
    The SearchPath function searches for the specified file. DWORD SearchPath(
      LPCTSTR lpPath,      // search path
      LPCTSTR lpFileName,  // file name
      LPCTSTR lpExtension, // file extension
      DWORD nBufferLength, // size of buffer
      LPTSTR lpBuffer,     // found file name buffer
      LPTSTR *lpFilePart   // file component
    );
      

  2.   

    SearchPath与findfirstfile有什么区别?
      

  3.   

    多用几个API不就可以了?
    ?????????????
      

  4.   

    能给点详细的说明吗?
    我发现SearchPath与findfirstfile、OpenFile都不能得到要求?
    我希望能得到和下面这段MFC程序完全相同的运行结果。
    CFileDialog fd(TRUE,NULL,pathName,NULL,"Hex Files(*.bin)|*.bin|All Files|*.*||",this);
      

  5.   

    GetOpenFileName
    The GetOpenFileName function creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to open.