Windows10周年更新后,MFC CPrintDlg运行不佳 [英] MFC CPrintDlg not working well after Windows10 Anniversary Update

查看:112
本文介绍了Windows10周年更新后,MFC CPrintDlg运行不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


亲爱的所有人,

Dear All,

我的MFC应用程序的打印对话框(源自CPrintDlg)没有收到WM_INITDIALOG消息,因此不会调用OnInitDialog。这仅在周年纪念更新后的Win10上发生。我们正在动态链接MFC,并且由于应用程序的
大小和复杂性而无法更改。我们正在使用Visual Studio 2010编译器,但使用Visual Studio 2013创建二进制文件。如果我们升级到VS2013编译器,它是否有可能是正确的?我们如何解决这个问题?告诉用户
卸载这个AU是不可能的解决方案。

My MFC application's printing dialog (derived from CPrintDlg) does not receive the WM_INITDIALOG message so OnInitDialog is not called. This happens only on Win10 after Anniversary Update. We are linking MFC dynamically and can not change this due to the sizes and complexity of the application. We are using the Visual Studio 2010 compiler, but making the binary with Visual Studio 2013. Is there any chance that it will be correct, if we upgrade to the VS2013 compiler? How can we fix this issue? Telling users to uninstall this AU is not possible solution.

提前谢谢你,

Attila

推荐答案

您好wburafakó,

Hi wburafakó,

感谢您在此发帖。

>>我的MFC应用程序的打印对话框(从CPrintDlg派生)未收到WM_INITDIALOG消息,因此未调用OnInitDialog。这仅在周年纪念更新后的Win10上发生。

Windows在显示对话框之前发生的Create,CreateIndirect或DoModal调用期间将WM_INITDIALOG消息发送到对话框。然后Windows通过使用所有Microsoft基础类库对话框共有的标准全局对话框
过程来调用OnInitDialog函数。它不会通过您的消息映射调用此函数,因此您不需要此方法的消息映射条目。

Windows sends the WM_INITDIALOG message to the dialog box during the Create, CreateIndirect, or DoModal calls, which occur immediately before the dialog box is displayed. Then Windows calls the OnInitDialog function by using the standard global dialog-box procedure common to all Microsoft Foundation Class Library dialog boxes. It does not call this function through your message map, and therefore you do not need a message map entry for this method.

所以我建议您按照以下步骤操作。

So I suggest you follow these steps below.

1. 检查您是否正确创建了此对话框。

1. Check if you have created this dialog correctly.

2。重新安装vc可再发行组件包并重建项目。

2. Reinstall the vc redistributable package and rebuild your project.

3。升级到vs2013或 vs 2015
并重试。

3. Upgrade to vs2013 or vs 2015 and try again.

希望这个可以帮到你。

最好的问候,

Sera Yu


这篇关于Windows10周年更新后,MFC CPrintDlg运行不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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