views:

16

answers:

1

I'm using a standard Windows FileDialog to allow the user to select some files. I'd like to filter out only the file types I'm interested in though (lets call them *.a and *.b). Is there any way to do this without using *.*? I've tried the following but it fails to match any files at all:

this->openFileDialog1->DefaultExt = L"*.a,*.b";
this->openFileDialog1->FileName = L"openFileDialog1";
this->openFileDialog1->Filter = L"My Data Files (*.a,*.b)|*.a,*.b";
+1  A: 

You need to use a semicolon:

this->openFileDialog1->Filter = L"My Data Files (*.a;*.b)|*.a;*.b";
Guido Domenici
+1/Accepted: Perfect - thanks :-)
Jon Cage