ATL activex MSDN教程示例:为什么我会得到intellisense错误? [英] ATL activex MSDN tutorial example: why do I get intellisense errors?

查看:90
本文介绍了ATL activex MSDN教程示例:为什么我会得到intellisense错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MSDN ActiveX模板库(ATL)教程构建PolygonActiveX控件。我按照MSDN教程中的说明进行操作,一切顺利,直到我将PolyCtl控件添加到项目中。添加PolyCtl控件后,它生成了PolyCtl.cpp和PolyCtl.h文件,它产生了9个IntelliSense错误,例如:(1)IntelliSense:标识符IPolyCtlEvents未定义,(2)IntelliSense:标识符CLSID_PolyCtl未定义,( 3)IntelliSense:标识符IPolyCtl未定义,(4)IntelliSense:标识符IID_IPolyCtl未定义....等我没有添加任何额外的代码。我只是按照MSDN教程说明创建了PolyCtl控件。为什么我会收到IntelliSense错误?



我尝试过:



我以为我做错了什么。因此,我从MSDN网站下载了Polygon ATL ActiveX Control示例的示例代码。当我打开项目时,该代码也会出现相同的错误。有谁知道导致这些错误的原因以及如何修复它?由于这些错误,我无法构建项目。谢谢。



Gopal Bhat

I used the MSDN ActiveX Template Library (ATL) Tutorial to build the "Polygon" ActiveX Control. I followed the instructions on the MSDN Tutorial, and everything went well until I added the "PolyCtl" control to the project. After adding the PolyCtl control, it generated PolyCtl.cpp and PolyCtl.h files and it gave 9 IntelliSense errors such as: (1) IntelliSense: identifier "IPolyCtlEvents" is undefined, (2) IntelliSense: identifier "CLSID_PolyCtl" is undefined, (3) IntelliSense: identifier "IPolyCtl" is undefined, (4) IntelliSense: identifier "IID_IPolyCtl" is undefined.... etc. I did not add any extra code. I just followed the MSDN tutorial instructions to create PolyCtl control. Why do I get the IntelliSense errors?

What I have tried:

I thought that I was doing something wrong. So, I downloaded the Sample Code for the "Polygon ATL ActiveX Control" example from MSDN website. When I open the project, that code also gives the same errors. Does anyone know what causes these errors and how to fix it? I cannot build the project because of these errors. Thanks.

Gopal Bhat

推荐答案

你最好使用以前版本的Visual Studio这样的VSS6 .0,其中没有IntelliSense,因为ATL对于用于C#.NET编程的Visual Studio 2015来说是旧的。
You would better to use the previous version of Visual Studio such VSS6.0, in which there's no IntelliSense, since the ATL is old for Visual Studio 2015 intended for C#.NET programming.


这篇关于ATL activex MSDN教程示例:为什么我会得到intellisense错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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