i'm creating a CFileDialog to ask user to select a file
but i want to filter out and show only a certain extension of .dat files or to check if the extension is correct,
how do i code this? maybe using regular expression?
FILE *filename;
CString cs;
//open file
CFileDialog m_ldFile(TRUE);
if(m_ldFile.DoModal()==IDOK)
cs=m_ldFile.GetFileName();
filename = fopen(cs,"r"
;
UpdateData(FALSE);
but i want to filter out and show only a certain extension of .dat files or to check if the extension is correct,
how do i code this? maybe using regular expression?
FILE *filename;
CString cs;
//open file
CFileDialog m_ldFile(TRUE);
if(m_ldFile.DoModal()==IDOK)
cs=m_ldFile.GetFileName();
filename = fopen(cs,"r"
UpdateData(FALSE);