we are using CFileDialog class in our project, it is a x64 configuration, For the file save option.
with following flag settings:
DWORD dwFlags = OFN_ENABLESIZING | OFN_EXPLORER | OFN_CREATEPROMPT | OFN_OVERWRITEPROMPT
| OFN_PATHMUSTEXIST | OFN_LONGNAMES
And a filter.
“Settings (.sls)|.sls|All Files (.)|.||”
Application works fine for the save option in Debug mode, but in Release mode it crash at “CString str= fileDlg.GetPathName();” in this function call.
if ( fileDlg.DoModal() == IDOK )
{
CString str= fileDlg.GetPathName(); // Application crash in release mode, for fileDlg.GetPathName(); function.
}
I am executing this code in Visual Studion 2022.
I am executing this code in Visual Studion 2022. Need Solution