打开对话框
CFileDialog cFilePath( TRUE,NULL,NULL,OFN_PATHMUSTEXIST,_T("VR Files (*.wrl)\0*.wrl\0All Files (*.*)\0*.*\0\0"));
WCHAR strBuffer[65535] = {0};cFilePath.m_ofn.lpstrFile = strBuffer;
cFilePath.m_ofn.nMaxFile = 65535;
if( cFilePath.DoModal() == IDOK )
{
LPWSTR lpFilePath = cFilePath.m_ofn.lpstrFile;
}
保存对话框
CFileDialog cFilePath( FALSE,NULL,NULL,OFN_PATHMUSTEXIST,_T("VR Files (*.wrl)\0*.wrl\0All Files (*.*)\0*.*\0\0"));
WCHAR strBuffer[65535] = {0};cFilePath.m_ofn.lpstrFile = strBuffer;
cFilePath.m_ofn.nMaxFile = 65535;
if( cFilePath.DoModal() == IDOK )
{
LPWSTR lpFilePath = cFilePath.m_ofn.lpstrFile;
}