
file open dialog when clicking on button
MFC makes this problem trivial.
CFileDialog dlg(
TRUE,
"txt",
NULL,
OFN_FILEMUSTEXIST | OFN_HIDEREADONLY,
"Text File (*.txt)|*.txt|All Files (*.*)|*.*||"
);
if (dlg.DoModal() == IDOK)
{
CString string = dlg.GetPathName();
Quote:
}
Look at the documentation of CFileDialog for the meanings of the
constructor arguments.
--Josh
Quote:
> Hi!
> I want to include a file open dialog in an existing MFC-application.
It
> should appear when clicking on a button. I also need a pointer to the
> selected file name.
> Thanks for helping, Roland.
Sent via Deja.com http://www.deja.com/
Before you buy.