Hello,
This is what I would like to do. I would like to make a save command. I would like it to look just like the one in Microsoft word when you click on the "save as" button. This is the code that I have, but it is for the open command, not the save command. I would like to know what the key words for the save as command are.
Thank you very much for your time.
Ronald

void CTry4Dlg::OnButton4()
{
OPENFILENAME ofn = {0};
char szName[MAX_PATH];
*szName = 0;
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = AfxGetApp()->m_pMainWnd->m_hWnd;
ofn.lpstrFilter = NULL;
ofn.lpstrFilter = "Text files (*.txt)\0*.txt\0All files (*.*)\0*.*\0";
ofn.lpstrCustomFilter = NULL;
ofn.nFilterIndex = 1;
ofn.lpstrFile = &szName[0];
ofn.nMaxFile = MAX_PATH;
ofn.lpstrInitialDir = m_DefaultDir;
ofn.lpstrTitle = "Open Text File";
ofn.lpstrFileTitle = NULL;
ofn.lpstrDefExt = "TXT";
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_EXPLORER;

if (GetOpenFileName(&ofn))
transfile1= ofn.lpstrFile;
CEdit* pEditShow = (CEdit*)GetDlgItem(IDC_EDIT4);
pEditShow->SetWindowText(transfile4);
}