我想像word那樣,把cedit第一行添加到cfiledialog的文件名中,作為文件標題,怎麼實現呢?
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();
}