指定路径保存文件
我的代码如下:
CDrawShapeView *pView = (CDrawShapeView *)((CFrameWnd*)AfxGetMainWnd())->GetActiveView();
CDrawShapeDoc *pDoc = pView->GetDocument();
CString strtime;
CTime Time = CTime::GetCurrentTime();
strtime.Format("%4d%s%d%s%d%s%d%s%02d%s%02d%s",Time.GetYear(),"年",Time.GetMonth(),"月",
Time.GetDay(),"日",Time.GetHour(),"时",Time.GetMinute(),"分",Time.GetSecond(),"秒");
CString PathName;
pDoc->SetPathName("c\\");
pDoc->DoSave(strtime+".lh");
它的结果是把文件保存到程序的目录下!
怎么没才能让我的文件保存到C盘那?急在线等待!!!!