Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,
I am writing a code for loading images.

This is the line from the code.

C++
CFileDialog fOpenDlg(TRUE, "txt", "", OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_HIDEREADONLY ,"All Image Files (*.jpg;*.jpeg;*.bmp;*.png)|*.jpg; *.jpeg; *.bmp ; *.png|Bitmap Files (*.bmp)|*.bmp|PNG Files (*.png)|*.png|JPEG Files (*.jpg;*.jpeg)|*.jpg; *.jpeg||", this); 


Here this should work if the file extension is .jpg or .JPG or .jPG or .JPg ,etc.
I don't want to do it manually.Is there any generic way for doing this. ??

I need the fix little urgently.Please update.
Thanx :)
Posted
Updated 22-May-12 18:23pm
v2
Comments
Sergey Alexandrovich Kryukov 23-May-12 1:06am    
It depends on platform, which is..?
--SA

Hey you are working on Windows.
It is not case sensitive. Give only .jpg, it will take the rest. Nothing you need to do.
 
Share this answer
 
Comments
Charmy from bangalore 23-May-12 1:37am    
thank you :)
The way you have the code will work like that.
Haven't you tried it?
 
Share this answer
 

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