Click here to Skip to main content
16,019,983 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using CFileDialog for Open file dialog. But it is not showing all the filter name in the (files of type) dropdown box. Actually this problem is only with Win. XP and the same code is working fine with Win 7.
The code is

CFileDialog oFileDlg(TRUE, NULL, NULL, OFN_EXPLORER | OFN_ALLOWMULTISELECT , _T("_T("Media Files (*.mgf;*.bmp;*.jpg;*.gif;*.tga;*.png;*.mif;*.tif;*.wbmp;*.tiff;*.bmi;*.paj;*.mat;*.jpeg;*.asf;*.avi;*.dat;*.divx;*.flv;*.m1v;*.m2v;*.m2p;*.m2t;*.m2ts;*.m4v;*.mkv;*.mov;*.mp1;*.mp2;*.mp4;*.mpeg;*.mpg;*.mpv;*.mts;*.mxf;*.swf;*.vob;*.wmv)|*.mgf; *.bmp; *.jpg; *.gif; *.tga; *.png;*.wbmp;*.tiff;*.bmi;*.paj;*.mat;*.jpeg;*.asf;*.avi;*.dat;*.divx;*.flv;*.m1v;*.m2v;*.m2p;*.m2t;*.m2ts;*.m4v;*.mkv;*.mov;*.mp1;*.mp2;*.mp4;*.mpeg;*.mpg;*.mpv;*.mts;*.mxf;*.swf;*.vob;*.wmv"), NULL);

any help will be appreciated.
Thank you in advance.
Posted

1 solution

are you missing the double pipe (||) at the END of your filter?
 
Share this answer
 
Comments
sanx84 13-Mar-12 1:48am    
no double pipe is there at the end.
the actual code is
CFileDialog oFileDlg(TRUE, NULL, NULL, OFN_EXPLORER | OFN_ALLOWMULTISELECT , __T("Media Files (*.mgf;*.bmp;*.jpg;*.gif;*.tga;*.png;*.mif;*.tif;*.wbmp;*.tiff;*.bmi;*.paj;*.mat;*.jpeg;*.asf;*.avi;*.dat;*.divx;*.flv;*.m1v;*.m2v;*.m2p;*.m2t;*.m2ts;*.m4v;*.mkv;*.mov;*.mp1;*.mp2;*.mp4;*.mpeg;*.mpg;*.mpv;*.mts;*.mxf;*.swf;*.vob;*.wmv)|*.mgf; *.bmp; *.jpg; *.gif; *.tga; *.png;*.wbmp;*.tiff;*.bmi;*.paj;*.mat;*.jpeg;*.asf;*.avi;*.dat;*.divx;*.flv;*.m1v;*.m2v;*.m2p;*.m2t;*.m2ts;*.m4v;*.mkv;*.mov;*.mp1;*.mp2;*.mp4;*.mpeg;*.mpg;*.mpv;*.mts;*.mxf;*.swf;*.vob;*.wmv|Bitmap Files (*.bmp;*.jpg;*.gif;*.png)|*.bmp; *.jpg; *.gif; *.png|Monarch Graphic File (*.mgf)|*.mgf|TrueVision Targa (*.tga)|*.tga|AVI Files (*.avi)|*.avi|MPEG Files (*.m2v; *.mpg; *.mpeg;*.mp4;*.m2p;*.vob;*.dat; *.wmv;*.mov;*.mp1;*m4v)|*.m2v; *.mpg; *.mpeg; *.mp4;*.m2p;*.vob;*.dat; *.wmv;*.mov;*.mp1;*.m4v||"), NULL);
barneyman 13-Mar-12 1:55am    
nothing springs out, except that's a HUGE filter ... have you tried something simpler?
sanx84 13-Mar-12 5:46am    
it is working fine with win. 7 but with XP the problem is...it just shows what fits to the width of dropdown box.

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