hi !
maybe someone can give me a hint.
how can i get the right filename?
with opendlg.GetFileName i get my file(test.dat),but for "fopen" i need const char !!
thanks
maybe someone can give me a hint.
how can i get the right filename?
with opendlg.GetFileName i get my file(test.dat),but for "fopen" i need const char !!
thanks
- Code:
TCHAR szFilter[] = _T("DatFiles (*.dat)|*.dat||");
CFileDialog opendlg(TRUE, NULL,TEXT("\\My Documents") , OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT ,szFilter);
if (opendlg.DoModal() == IDOK)
{
CString filename = opendlg.GetFileName();
FILE *stream = fopen(filename, "r");
}