请问这样的功能应该如何实现,
用文档视图结构,从指定文件夹中读取一张bmp图片,显示并处理后自动读取下一张图片并进行处理,直到文件夹里的图片全部处理完毕。
谢谢。

解决方案 »

  1.   

    这个简单,把文件名命名的有规律,根据规律的文件名依次读取就完了,比如1.bmp 2。bmp ,3。bmp  
    当然楼上的是好办法
      

  2.   

    首先要搞清楚位图文件的格式。
    接着搞清楚VC中文件读写的相关函数。
    然后弄懂怎么遍历文件夹中的文件。
    最后弄清楚怎么在MFC框架中添加菜单响应。
      

  3.   

    读BMP文件不用知道格式吧,用LoadImage就行了。
      

  4.   

    http://topic.csdn.net/u/20100502/11/aa4cb649-2fdf-4356-bd41-db569e13030f.html这是我发的帖子,
      

  5.   

    CString pathname , froot ,filename , path , f_name;
    BOOL    bResult ;
    CFile file ; CFileDialog dlg(TRUE, NULL, NULL,OFN_HIDEREADONLY,"*.bmp|*.bmp|All Files(*.*)|*.*||") ;
    if(dlg.DoModal() == IDOK)
    {
    pathname = dlg.GetPathName() ;
    CFileFind finder ;
    finder.FindFile(pathname) ;
    finder.FindNextFile() ;
    froot = finder.GetRoot() ;
    CString root = froot ;
    pathname = froot+"\\*.*" ;
    bResult = finder.FindFile(pathname) ;
    while (bResult)
    {
    bResult = finder.FindNextFile() ;
    if(finder.IsDots())
    continue ;
    if(finder.IsDirectory())
    continue ;
    filename = finder.GetFileName() ;
    if("bmp" != filename.Right(3) && "BMP" != filename.Right(3))
    continue ;
    path = finder.GetFilePath() ;
    }
    }