void CHomeworkDlg::OnButton3() //打开数据按钮设置
{
// TODO: Add your control notification handler code here
renew();
drawtype=1;
CString strf;
strf="Txt Files(*.txt)|*.txt||";
CFileDialog dlg(true,NULL,NULL,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_ENABLESIZING|OFN_FILEMUSTEXIST,strf);
dlg.m_ofn.lStructSize =sizeof(OPENFILENAME);
if(dlg.DoModal==IDOK)
{
strDirFile=dlg.GetPathName();
}
CWnd::UpdateData(false);
CFile file(strDirFile,CFile::modeReadWrite|CFile::shareExclusive);
CArchive ar(&file,CArchive::load);
CWnd::UpdateData(true);
while (num
{
ar>>filedata[num];
data[num]=(float)(atof(LPCTSTR(filedata[num])));
CWnd::UpdateData(true);
报错说 E:\编程\homework\homeworkDlg.cpp(228) : error C2446: '==' : no conversion from 'const int' to 'int (__thiscall CFileDialog::*)(void)'
There are no conversions from integral values to pointer-to-member values
:\编程\homework\homeworkDlg.cpp(228) : error C2040: '==' : 'int (__thiscall CFileDialog::*)(void)' differs in levels of indirection from 'const int'