Since WindowsXP is out-of-date an older application I have is not working while using CFileDialog.
In the application I have a FileOpenDialog and had a customized preview, because the textfiles are in a special order.
There are lines like "PNL2,1,81572000,2580,257,4,0,0,0,0,0,1,0,0,,,,,,,0" I want to give only special Information in the preview.
So under XP I had a FileOpenDialog to open one of that files and hook an other Dialog on it:
CStapelDatDlg::CStapelDatDlg(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
, m_bDelAfter(0)
{
m_ofn.Flags |= (OFN_EXPLORER | OFN_ENABLETEMPLATE);
m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_STAPELDATEXTDLG);
m_bVistaStyle = FALSE;
}
I tried to get it to work under win7 and had to set
m_bVistaStyle = FALSE;
Then my own dialog comes up but the program crashes everytime i press cancel or open.
I tried out the IFileDialogCustomize-Interface but there are only little powerful actions possible.
So what I look for is some of the following:
a) a possibility to open my own dialog with the new CFiledialog:
Is that possible, are there internet references to it ? I tried to find some-
thing about that but I didn't find anything usefull but read that it maybe
impossible to do what I try to do here.
b) Maybe someone created an own FileDialog-Class that works under win7 and allows
to hook dialogs on it or otherwise gives the possibility to put a custom-preview
on it.
If there are any references or clues how to solve my problem, please answer this question.