如何为基于Win32对话框的应用程序在Visual Studio 2012中启用“插入Activex控件”? [英] How to enable 'Insert Activex Control' in Visual Studio 2012 for a Win32 Dialog based application?
问题描述
我是 ActiveX控件
的新手,尽管我具有COM / ATL编程的一些基本知识。
I am new to ActiveX Controls
, though I have some basic background in COM/ATL programming.
该项目是使用Visual Studio 2012向导创建的简单Win32项目。我选择了所有默认选项。该对话框是使用资源编辑器对话框创建的,然后选择新对话框选项。
The project is a simple Win32 project created using the Visual Studio 2012 wizard. I have selected all the default options. The dialog box is created using the resource editor dialog and then selecting new dialog option.
在我的应用程序中,我想将Internet Explorer(或其他一些)activex控件托管在对话框。但是问题是,当我右键单击(很多站点甚至msdn都建议)时,插入activex控件...
始终被禁用。我不使用 MFC,而是 CAxDialogImpl
(如此处所述)。
In my application I want to host the Internet Explorer (or some other) activex control in a dialog box. But the problem is that when I right click (as suggested by many sites and even msdn) the insert activex control ...
is always disabled. I am not using MFC, but instead CAxDialogImpl
(as described here).
请指出我做错了什么?如何在Visual Studio 2012对话框编辑器中启用 insert activex控件...
?
Please suggest what I am doing wrong? How can I enable insert activex control ...
in Visual Studio 2012 dialog editor?
推荐答案
我花了很多时间来启用它,但是答案很简单:在 resource.h文件中删除宏 _APS_NO_MFC。
I took considerable time to enable it, but the answer is simple: remove the macro "_APS_NO_MFC" in "resource.h" file.
这篇关于如何为基于Win32对话框的应用程序在Visual Studio 2012中启用“插入Activex控件”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!