写的是一个基于对话框的程序
vc6上测试通过的程序,在vs08上面就报错
1>e:\uhg-iso1234567\uhg-iso\fileedit.cpp(90) : error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CFileEdit::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)'
1>        Cast from base to derived requires dynamic_cast or static_cast
然后把UINT改成 LRESULT之后,可以运行,但是在第二次单击浏览文件按钮的时候就会中断,其中错误在dlgfile.cpp文件 ENSURE(SUCCEEDED(hr));
for (nFilterIndex = 0; nFilterIndex < nFilterCount; nFilterIndex++)
{
delete[] pFilter[nFilterIndex].pszName;
delete[] pFilter[nFilterIndex].pszSpec;
}
delete[] pFilter; hr = (static_cast<IFileDialog*>(m_pIFileDialog))->SetFileTypeIndex(m_ofn.nFilterIndex > 1 ? m_ofn.nFilterIndex : 1);
ENSURE(SUCCEEDED(hr));这个地方……