if( ImgFileName == NULL) *pbFileFound = FALSE; else ----- ----
CString
// Added also a check for an empty string here if (ImgFileName == NULL || *ImgFileName == _T('\x0')) *pbFileFound = FALSE; else { // Create a CString copy from the string CString strFileName(ImgFileName); // Removes leading and trailing spaces from the string strFileName.Trim(); // Optionally check again for empty string after trimming if (strFileName.IsEmpty()) *pbFileFound = FALSE; else { // Can use strFileName to open the file } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)