错误 1 error C2664: “CFileDialog::CFileDialog(BOOL,LPCTSTR,LPCTSTR,DWORD,LPCTSTR,CWnd *,DWORD,BOOL
voidCCAXA3dApp::OnFileOpen(){//TODO:在此添加命令处理程序代码//弹出选择文件对话框CStringstrFileName;CFileDi...
void CCAXA3dApp::OnFileOpen()
{
// TODO: 在此添加命令处理程序代码
//弹出选择文件对话框
CString strFileName;
CFileDialog fileDlg(TRUE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_ALLOWMULTISELECT|OFN_EXPLORER,L"所有类型(*.*)|*.*|", this);
CONST DWORD nMaxFile = 1024*1024;
TCHAR* pbFileNameBuf = new TCHAR[nMaxFile];
if ( NULL == pbFileNameBuf )
{
return ; // E_OUTOFMEMORY
}
memset(pbFileNameBuf, 0, nMaxFile);
fileDlg.m_pOFN->lpstrFile = pbFileNameBuf;
fileDlg.m_pOFN->nMaxFile = nMaxFile;
if(fileDlg.DoModal() == IDOK)
{
POSITION pos = fileDlg.GetStartPosition();
while(pos != NULL)
{
strFileName= fileDlg.GetNextPathName(pos);
//在调试信息区依次输出所选的每一个文件名
OpenDocumentFile(strFileName);
}
}
if ( NULL != pbFileNameBuf )
{
delete[] pbFileNameBuf;
pbFileNameBuf = NULL;
}
}
错误 1 error C2664: “CFileDialog::CFileDialog(BOOL,LPCTSTR,LPCTSTR,DWORD,LPCTSTR,CWnd *,DWORD,BOOL)”: 不能将参数 6 从“CCAXA3dApp *const ”转换为“CWnd *” c:\documents and settings\dell\桌面\caxa3d\caxa3d\caxa3d.cpp 236
2 IntelliSense: 没有与参数列表匹配的构造函数 "CFileDialog::CFileDialog" 实例 c:\documents and settings\dell\桌面\caxa3d\caxa3d\caxa3d.cpp 236 展开
{
// TODO: 在此添加命令处理程序代码
//弹出选择文件对话框
CString strFileName;
CFileDialog fileDlg(TRUE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_ALLOWMULTISELECT|OFN_EXPLORER,L"所有类型(*.*)|*.*|", this);
CONST DWORD nMaxFile = 1024*1024;
TCHAR* pbFileNameBuf = new TCHAR[nMaxFile];
if ( NULL == pbFileNameBuf )
{
return ; // E_OUTOFMEMORY
}
memset(pbFileNameBuf, 0, nMaxFile);
fileDlg.m_pOFN->lpstrFile = pbFileNameBuf;
fileDlg.m_pOFN->nMaxFile = nMaxFile;
if(fileDlg.DoModal() == IDOK)
{
POSITION pos = fileDlg.GetStartPosition();
while(pos != NULL)
{
strFileName= fileDlg.GetNextPathName(pos);
//在调试信息区依次输出所选的每一个文件名
OpenDocumentFile(strFileName);
}
}
if ( NULL != pbFileNameBuf )
{
delete[] pbFileNameBuf;
pbFileNameBuf = NULL;
}
}
错误 1 error C2664: “CFileDialog::CFileDialog(BOOL,LPCTSTR,LPCTSTR,DWORD,LPCTSTR,CWnd *,DWORD,BOOL)”: 不能将参数 6 从“CCAXA3dApp *const ”转换为“CWnd *” c:\documents and settings\dell\桌面\caxa3d\caxa3d\caxa3d.cpp 236
2 IntelliSense: 没有与参数列表匹配的构造函数 "CFileDialog::CFileDialog" 实例 c:\documents and settings\dell\桌面\caxa3d\caxa3d\caxa3d.cpp 236 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询