本文介绍了文件过滤问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想使用CFileDialog类打开一个xml文件.为此,我使用了以下代码.

static char BASED_CODE szFilter[] = "Scan Report(*.xml)|*.xml||";

CFileDialog dlg(1,"xml","Scan Report",OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_HIDEREADONLY,szFilter);



但是我收到以下错误..

E:\Jijesh\ReportEx\ReportExDlg.cpp(229) : error C2664: ''CFileDialog::CFileDialog'' : cannot convert parameter 3 from ''char [12]'' to ''const unsigned short *''



请帮助我.

解决方案


Hi all,
I want to use CFileDialog class to open an xml file. For that I''ve used the following codes.

static char BASED_CODE szFilter[] = "Scan Report(*.xml)|*.xml||";

CFileDialog dlg(1,"xml","Scan Report",OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_HIDEREADONLY,szFilter);



But I am receiving the following error..

E:\Jijesh\ReportEx\ReportExDlg.cpp(229) : error C2664: ''CFileDialog::CFileDialog'' : cannot convert parameter 3 from ''char [12]'' to ''const unsigned short *''



Please help me.

解决方案



这篇关于文件过滤问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 10:21