就像word一樣,添加到cfiledialog的文件名中,用cedit的第一行作為標題,怎麼實現呢?
void CApp2Dlg::OnButton1()
{
// TODO: Add your control notification handler code here
char buffer[201];
int n = m_edit1.GetLine(0, buffer, 100);
*(buffer + n) = '\0';
CFileDialog saveFile(FALSE, ".txt", buffer, OFN_CREATEPROMPT | OFN_PATHMUSTEXIST , "Text Files|*.txt|All files (*.*)|*.*||");
saveFile.DoModal();
}