G
Guest
Changing the current directory with the help of dialog window(MFC app)
We can change directory with the help of the following code:
CFileDialog m_ldFile(TRUE);
m_ldFile.m_ofn.lpstrInitialDir="c:\\"; // the initial folder.
//below the dialog window is opened, then tfolders and eventually a file
and after automatically current directory is changed .
if(m_ldFile.DoModal()==IDOK)
{
//below finding out the path.
m_strPath=m_ldFile.GetPathName();
UpdateData(FALSE);
}
We don't need to open a file, but only a folder, in order to change
current directory.
Could you explain please, how I can change current directory without
opening file.
Alur.
We can change directory with the help of the following code:
CFileDialog m_ldFile(TRUE);
m_ldFile.m_ofn.lpstrInitialDir="c:\\"; // the initial folder.
//below the dialog window is opened, then tfolders and eventually a file
and after automatically current directory is changed .
if(m_ldFile.DoModal()==IDOK)
{
//below finding out the path.
m_strPath=m_ldFile.GetPathName();
UpdateData(FALSE);
}
We don't need to open a file, but only a folder, in order to change
current directory.
Could you explain please, how I can change current directory without
opening file.
Alur.