用CFileDialog得到的路径是'\'间隔的
CString strFile="chart Files(*.mat)|*.mat|All Files(*.*)|*.*|";
CFileDialog dlg(true,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,strFile);
dlg.DoModal();
CString path=dlg.GetPathName( );
如'e:\k4.mat',
我需要的是e:\\k4.mat.
CString strFile="chart Files(*.mat)|*.mat|All Files(*.*)|*.*|";
CFileDialog dlg(true,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,strFile);
dlg.DoModal();
CString path=dlg.GetPathName( );
如'e:\k4.mat',
我需要的是e:\\k4.mat.
找以后自己加'\';
CString::Replace
但是你要"e:\\k4.mat"来干什么?生成源代码?
CString::Replace 不能对它操作。
有办法把const指向的内容 修改?