CFileDialog :: OnInitDialog () does not call

I use a custom file dialog that extends from CFileDialog. The problem is that it is OninitDialog()not called before DoModal().

I tuned CFileDialogin OninitDialog().

I am using VS 2012 with Win7 OS.

I could not find out what was going wrong.

+5
source share
2 answers

Microsoft's documentation says it is OnInitDialognot supported on Windows Vista. The same is true for Windows 7 (and probably also for Windows 8).

+2
source

; , , m_bVistaStyle = FALSE; OnInitDialog, .

CMyOpenDlg::CMyOpenDlg(LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
      DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
      CFileDialog(TRUE, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
{
   m_bVistaStyle = FALSE;
+2

All Articles