I think he distinctly said he didn't want that solution. ;)
AliR.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
For the simple case of text input, create a dialog box. Put a static
control in it that
says "Filename:" and an edit control. Create a data member variable (a
CString) for the
edit control. Suppose this is calledd m_Filename. Then you invoke it as
CGetFilename dlg;
if(dlg.DoModal() != IDOK)
return;
CString filename = dlg.m_Filename;
...use filename for whatever purpose you want.
But for files, you typically use the CFileDialog, e.g.,
CFileDialog dlg(...parameters here....);
if(dlg.DoModal() != IDOK)
return;
CString filename = dlg.GetPathName(); // I think this is
the method...
joe
On Thu, 07 Jun 2007 09:03:05 -0700, shamit1982@gmail.com wrote:
I'm trying to a create a very simple MFC dialog box in Visual C++
6.0. I want to the user to input a file name, but I cannot figure out
how to go about doing that. I don't want them to write out the entire
path in a Edit Box, rather some sort of explorer that lets them
navigate to the file they want.
Any help would be greatly appreciated.
Thanks,
Shamit
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm