Is there a way to attach the CFileDialog Open/Save File dialog box to a window? I want an open file
area incorporated into a window I am making.
Printable View
Is there a way to attach the CFileDialog Open/Save File dialog box to a window? I want an open file
area incorporated into a window I am making.
Hi,
This should give you an idea of how to do it...
void CSoftBMPDlg::OnTestFile()
{
static char BASED_CODE szFilter[] = "Bitmap Files (*.bmp)|*.bmp ||";
CString strFile;
CFileDialog fd(TRUE, _T("*.BMP"), _T("*.BMP"), OFN_READONLY, szFilter, this);
if(fd.DoModal()==IDOK)
{
strFile = fd.GetPathName();
AfxMessageBox(strFile);
}
}
Lookup CFileDialog in the help for a description of it's parameters.
Regards,
Paul Belikian