从CFileDialog派生的CustomDialog中未调用OnInitDialog函数 [英] OnInitDialog function not invoked in the CustomDialog Derived from CFileDialog

查看:159
本文介绍了从CFileDialog派生的CustomDialog中未调用OnInitDialog函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好...
我的应用程序中有一个奇怪的问题.我有一个从CFileDilaog派生的CCustFileDlg.在vs 2003中,该代码运行良好,但在vs 2010中,未调用CustFileDlg的OnInitDilaog函数的移植.调用cunstroctor ..也调用了distructor,但未调用onnitDialog函数...

谢谢&问候...

解决方案

将m_bVistaStyle设置为CFileDialog的FALSE.

CCustFileDlg :: CCustFileDlg(BOOL OpenFileDialog,LPCTSTR szDefExt,LPCTSTR szFileName,DWORD标志,LPCTSTR szFilter,CWnd * ParentWnd,DWORD Size):CFileDialog(OpenFileDialog,szDefExt,szFileName,Flags,szFilter,ParentWnd)

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...

解决方案

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)


这篇关于从CFileDialog派生的CustomDialog中未调用OnInitDialog函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆