在Visual Studio 2017中添加ATL简单对象 [英] Add ATL Simple Object in Visual Studio 2017

查看:796
本文介绍了在Visual Studio 2017中添加ATL简单对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Visual Studio 2017中处理旧的ATL/COM项目.

I am working with an old ATL/COM project in Visual Studio 2017.

在Visual Studio的早期版本中,您可以选择添加类",然后选择选项添加简单ATL对象"以将COM类添加到项目中. Visual Studio 2017中似乎完全缺少此选项.

In previous versions of Visual Studio you could select "Add Class" and then select the option "Add simple ATL object" to add a COM class to the project. This option appears to be completely missing in Visual Studio 2017.

选项已被移动吗?

我错过了安装选项吗?

Visual Studio是否无法将我的项目识别为ATL项目? (它是使用较旧的版本创建的.)

Does Visual Studio fail to recognize my project as an ATL project? (It was created with a much older version.)

或者这是ATL道路的尽头吗?

Or is this the end of the road for ATL?

推荐答案

我不确定这是否是答案,但对于评论来说,太多了​​,而不仅仅是对问题的编辑.

I'm not sure whether this an answer, but it is too much for a comment and more than just an edit to the question.

我已经在两个系统上进行了测试,

I have tested on two systems, with

  • Visual Studio Community 2017版本15.1
  • Visual Studio Professional 2017 15.3.2版

,我认为这两个版本之间的功能已发生变化.我认为Community版本和Professional版本之间不太可能有区别.

and I believe that the functionality has changed between these two versions. I think it is unlikely to be a difference between the Community and Professional versions.

在这两种情况下,我都创建了一个新的ATL项目,并尝试了三种添加类的方法:

In both cases I created a new ATL project and tried three ways to add a class:

    班级视图 中的上下文菜单中
  1. 添加班级... 解决方案资源管理器
  2. 中的上下文菜单中
  3. 添加课程... 解决方案资源管理器
  4. 中的上下文菜单中
  5. 添加新项目...

在15.1版中,添加类"将打开以下对话框,从中可以添加ATL简单对象.

With version 15.1, Add Class opens the following dialog, from which I can add an ATL Simple Object.

对于15.3.2版,添加类"将打开以下对话框,其中没有ATL简​​单对象的任何选项.

With version 15.3.2, Add Class opens the following dialog, without any option for an ATL Simple Object.

但是,在15.3.2版中,添加新项"会打开以下对话框,并带有一个用于创建ATL简单对象的新选项,该对象以前在此对话框中不可用.

However, with version 15.3.2, Add New Item opens the following dialog, with a new option to create an ATL Simple Object, which was previously not available in this dialog.

因此,似乎该功能已被移动.奇怪的是,它在类视图"中不再可用(我认为这是一个错误).

So, it seems that the functionality has been moved. Curiously, it is no longer available in the Class View (which in my opinion is a mistake).

这篇关于在Visual Studio 2017中添加ATL简单对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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