Problem with MessageBox and UpdateData
Hello,
I develop a small MFC application when I put a button I can open my
hard disk and I choose a file. After to have choose, size and name of
the file are implemented in two variable of my new class.
In fact, to reduce my source file, I add a source fille (.cpp) where I
declare my function who open my hard directory, this is my source code
:
CString choix_film(int m_taille,CString m_essai2,CString m_essai1){
CString OpenFilter;
OpenFilter = "All Files (*.*)|*.*||";
CString s;
CFileDialog
FileOpenDialog(TRUE,NULL,NULL,OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST,OpenFilter,AfxGetMainWnd());
if(FileOpenDialog.DoModal()==IDOK)
{
CFile File;
VERIFY(File.Open(FileOpenDialog.GetPathName(),CFile::modeRead));
//Taille du fichier
m_taille=(File.GetLength()/1048576);
UpdateData(false);
// Chemin du fichier
m_essai2=File.GetFilePath();
// Nom du fichier
m_essai1=File.GetFileName();
UpdateData(false);
}
return(m_essai2);
}
But when I build, UpdateData undeclared identifier error is display.
I have the same error with MessageBox and I don't understand.
Can you help me ?