Hi,
I Created SaveAs FileDialog.
In that SaveAs FileDialog ,, in SaveIn combobox, i want my required location to be there when the dialog is created.
How can i get that.
Regards
Kiran
Printable View
Hi,
I Created SaveAs FileDialog.
In that SaveAs FileDialog ,, in SaveIn combobox, i want my required location to be there when the dialog is created.
How can i get that.
Regards
Kiran
Set the lpstrInitialDir member of the OPENFILENAME structure. If you're using the MFC class CFileDialog, that structure is a class member called m_ofn.
// szFilters is a text string that includes two file name filters:
// "*.my" for "MyType Files" and "*.*' for "All Files."
char szFilters[]="MyType Files (*.my)|*.my|All Files (*.*)|*.*||";
// Create an Open dialog; the default file name extension is ".my".
CFileDialog fileDlg (FALSE, "my", "*.my",
OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this);
fileDlg.m_ofn.lpstrInitialDir = "E:\\";
thanku..
it worked perfectly.
--Kiran