|
-
April 24th, 1999, 07:57 PM
#1
Suggesting a name in the File Dialog
Hi
I was wondering if somebody could tell me how to "suggest" a name to the File Dialog each time it opens up. What I mean by "suggest" is when the File Dialog Box opens up there is already a name there for the user to save as, if he or she wants to use.
Thanks
-
April 24th, 1999, 10:14 PM
#2
Re: Suggesting a name in the File Dialog
If your filedialog box uses an edit window to input the file name, you could use
((CEdit*)GetDlgItem(IDC_EDIT1))->SetWindowText(filename); //Set filepath test to Edit 1 edit box
If it doesn't, tell me what is the input window type, and I wil try to help you.
Joe Farkas
[email protected]
[email protected]
-
April 24th, 1999, 10:45 PM
#3
Re: Suggesting a name in the File Dialog
Thanks for replying Joe, but actually I was just using the windows default File Dialog:
CFileDialog dlg(FALSE);
Is there any way I could have a name for the file to be saved as it already in using the CFileDialog like so up above?
Thanks
-
April 24th, 1999, 10:51 PM
#4
Re: Suggesting a name in the File Dialog
Look up CFileDialog in the Help...
The third parameter can be a default file name....
CString m_szNewEDLName = "MyFileName.ext";
CFileDialog dlg(FALSE, _T("ext"), m_szNewEDLName, OFN_FILEMUSTEXIST | OFN_HIDEREADONLY, _T("(Your file type) Files (*.ext)|*.ext|All Files (*.*)|*.*||"));
Rail
Recording Engineer/Software Developer
Rail Jon Rogut Software
[email protected]
http://home.earthlink.net/~railro/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|