如何枚举MFC Shell List控件中的特定文件类型? [英] How to enumerate specific file types in MFC Shell List control?

查看:276
本文介绍了如何枚举MFC Shell List控件中的特定文件类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我为我的学习做了一个图像查看器。

我在我的项目中放了一个MFC shell树控件和MFC shell列表控件

,它运作正常。

只有文件夹显示在MFC shell树控件中,所有文件都在MFC列表控件中..



i想知道如何仅枚举图像类型文件(.jpg,.bmp,.gif,.png)

有没有可用的功能?



这是我的代码控件(树一和列表一)



m_shellTree.Expand(m_shellTree.GetRootItem(),TVE_EXPAND);

m_shellTree.SetRelatedList(& ; m_shellList);

Hi,
I have made a image viewer for my study.
I put a MFC shell tree control and MFC shell list control in my project
and it works ok.
Only folders are shown in MFC shell tree control and all files are in MFC list control..

i wonder how to enumerate only image type files(.jpg, .bmp, .gif, .png)
is there any functions available?

this is my code for the controls(tree one and list one)

m_shellTree.Expand(m_shellTree.GetRootItem(), TVE_EXPAND);
m_shellTree.SetRelatedList(&m_shellList);

推荐答案

没有。所以你必须给自己写一个解决方案。使用FindFile并 FindNextFile 并检查每个找到的内容文件是否适合您的文件类型。
No. So you must write yourself a solution. Use the FindFile and FindNextFile and check each found file if it fits in your file type.


这篇关于如何枚举MFC Shell List控件中的特定文件类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆