在VS 2017中手动启用ActiveX支持 [英] Manually enabling ActiveX support in VS 2017

查看:587
本文介绍了在VS 2017中手动启用ActiveX支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发VS 2017,我想手动为基于对话框的应用程序启用ActiveX支持。所以我在InitInstance()方法中包含了AfxEnableControlContainer()。现在我可以在子对话框上加载Flash Shockwave对象了。但是应用程序
在显示子对话框后立即挂起(其中包含flash COM对象)。   BTW AfxOleInit()不能正常工作,所以我将其排除在外。我在DLL模式下使用MFC。

I am working on VS 2017 and I want to manually enable ActiveX support to a dialog based application. So I included AfxEnableControlContainer() in the InitInstance() method . Now I am able to load Flash Shockwave object on a child dialog. But the application hangs immediately after showing the child dialog ( where flash COM object is included).  BTW AfxOleInit() don't work as well, so I excluded it. I am using MFC in DLL mode .

m_pChildDlg = new ChildDlg; 
m_pChildDlg ->Create(IDD_FLASH, this); // Execution stops here


当我尝试使用ActiveX支持的基于MFC对话框的新程序(在DLL模式下使用MFC)时,它运行正常。 

When I try on a new MFC dialog based program ( using MFC in DLL mode) with ActiveX support , it run perfectly alright. 

出现此错误的原因可能是建议。

What could be the reason for this error, please advice.




推荐答案

那么什么是不同的基于ActiveX支持的基于MFC对话框的新应用程序以及您希望在事后添加ActiveX支持的代码? 你有你需要做的比较。
So what is different between a new MFC dialog based application with ActiveX support and the code to which you want to add ActiveX support after the fact?  You have what you need to do the comparison.


这篇关于在VS 2017中手动启用ActiveX支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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