CFileDialog infofile(FALSE,NULL,”请输入要保存的模板名称”,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_NOCHANGEDIR, “TPL文件(*.tpl)|*.TPL| |”,AfxGetMainWnd()); infofile.m_ofn.lpstrInitialDir = “c:\\”; CString strTplFileName; if(infofile.DoModal()==IDOK) { strTplFileName=infofile.GetPathName()+”.tpl”; } 这样就能保存到c盘下了。
Read more月度归档: 2014年5月
vc-mfc-CFileDialog 保存文件到指定目录文件下
[mfc][vc++]如何得到对话框标题
[mfc][vc++] 如何得到对话框标题 LPTSTR buffer= new TCHAR[255]; ::GetWindowText(GetActiveWindow()->m_hWnd,buffer,255); CString strWindowName = “”; strWindowName.Format(“%s”,buffer); MessageBox(strWindowName); delete [] buffer;
Read more
[mfc][vc++] 如何得到对话框标题 LPTSTR buffer= new TCHAR[255]; ::GetWindowText(GetActiveWindow()->m_hWnd,buffer,255); CString strWindowName = “”; strWindowName.Format(“%s”,buffer); MessageBox(strWindowName); delete [] buffer;
Read more