OpenDialog
-
How do i restrict the user to go to one particular directory if the browse button is clicked? its an mfc application
-
How do i restrict the user to go to one particular directory if the browse button is clicked? its an mfc application
-
i am getting the complete path name using the GetPathName(). now say i get something like this. c:\\program files\\my folder\\1.c now i want to extract only "c:\\program files" this looks really simple.. but i need some help.
-
i am getting the complete path name using the GetPathName(). now say i get something like this. c:\\program files\\my folder\\1.c now i want to extract only "c:\\program files" this looks really simple.. but i need some help.
what is the condition to decide "c:\\program files" is the needed directory ? The first folder after the drive letter? If so passing the above string to PathRemoveFileSpec() for two time will return "c:\\program files".
-
what is the condition to decide "c:\\program files" is the needed directory ? The first folder after the drive letter? If so passing the above string to PathRemoveFileSpec() for two time will return "c:\\program files".
that was just an example.. its so programmed that the data will be available in the 1st level.
-
How do i restrict the user to go to one particular directory if the browse button is clicked? its an mfc application
Here it is -
CFileDialog dlg(TRUE);
CString sPath = "c:\\program files\\my folder\\1.c";
int nPos = sPath.Find("\\");
nPos = sPath.Find("\\",nPos + 1);
sPath = sPath.Left(nPos + 1);
dlg.m_ofn.lpstrInitialDir = sPath;
dlg.DoModal();