Add ATL Simple Object in Visual Studio 2017

后端 未结 3 802
执念已碎
执念已碎 2021-01-03 02:23

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

In previous versions of Visual Studio you could select \"Add Class\" and then select the option \"Add

3条回答
  •  鱼传尺愫
    2021-01-03 03:06

    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, Version 15.1
    • Visual Studio Professional 2017, Version 15.3.2

    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.

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

    1. Add class... from the context menu in the Class View
    2. Add class... from the context menu in the Solution Explorer
    3. Add New Item... from the context menu in the Solution Explorer

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

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

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

提交回复
热议问题