Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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);
Posted

1 solution

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.
 
Share this answer
 
Comments
Papatoe 22-Dec-14 18:07pm    
If I used a list control, I would do that... but it was MFC Shell list control.
It automatically added files when I put on my dialog.
Should i delete items in my shell list control?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900