开发者

Is it possible to have file filters for multiple extension types?

I'm开发者_JAVA技巧 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";


You need to use a semicolon:

this->openFileDialog1->Filter = L"My Data Files (*.a;*.b)|*.a;*.b";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜