File browser control in MFC
-
Is there any file browser control in MFC? my requirement is, the application should allow the user to browse a file, based on the user selection i should get the selected file name and the corresponding file path to do some operations on that file. please provide the solution for this problem, thanks in advance Regards, Anil
hi
-
Is there any file browser control in MFC? my requirement is, the application should allow the user to browse a file, based on the user selection i should get the selected file name and the corresponding file path to do some operations on that file. please provide the solution for this problem, thanks in advance Regards, Anil
hi
Why don't you just use CFileDialog class?
Thank you masters!
-
Is there any file browser control in MFC? my requirement is, the application should allow the user to browse a file, based on the user selection i should get the selected file name and the corresponding file path to do some operations on that file. please provide the solution for this problem, thanks in advance Regards, Anil
hi
A sample code to select Text/CSV file here:
CFileDialog l_SampleDlg(TRUE,NULL,NULL,OFN_OVERWRITEPROMPT,"Text Files (*.txt)|*.txt|Comma Separated Values(*.csv)|*.csv||");
int iRet = l_SampleDlg.DoModal();
CString l_strFileName;
l_strFileName = l_SampleDlg.GetPathName();if(iRet == IDOK) MessageBox(l\_strFileName); else MessageBox("No File Selected!");
-- "Programming is an art that fights back!"