Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello ...
I am having an strange problem in my application. I have an CCustFileDlg derived from the CFileDilaog. In vs 2003 the code worked fine but in vs 2010 while porting the OnInitDilaog function of the CustFileDlg is not invoked. The cunstroctor is called.. also the distructor too is called but the onnitDialog function is not called...

Thanks & Regards...
Posted

1 solution

Set m_bVistaStyle to FALSE of the CFileDialog.

CCustFileDlg::CCustFileDlg(BOOL OpenFileDialog, LPCTSTR szDefExt, LPCTSTR szFileName,DWORD Flags,LPCTSTR szFilter,CWnd* ParentWnd,DWORD Size):CFileDialog(OpenFileDialog,szDefExt,szFileName,Flags,szFilter,ParentWnd,Size,0)
 
Share this answer
 
v2
Comments
Albert Holguin 3-Feb-12 16:56pm    
Yep, that "Vista Style" thing did a number on my apps too. :) +5
DavidCarr 28-Aug-15 15:51pm    
Is there some way of leaving it as a Vista style, but catching the dialog before it appears - if not through OnInitDialog() - to do some customization?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900