CComPtr未定义错误 [英] CComPtr Undefined Error

查看:319
本文介绍了CComPtr未定义错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的MFC activex控件。我还使用Add-> Add Class为上面的项目添加了为ATFC添加ATL支持课程。现在,如果我使用CComPtr< T> X;它显示CComPtr未定义,即使我已经包含了atlbase.h和头文件。

I have created a simple MFC activex control. I have also added class "Add ATL Support to MFC" for the above project using Add->Add Class. now if I use CComPtr< T> x; its showing CComPtr undefined even though I have included atlbase.h and header files.

推荐答案

问题解决了。我刚刚将ATL名称空间添加为using namespace ATL;问题解决了。感谢所有帮助过的人。
Problem solved. I just added ATL namespace as "using namespace ATL;" and the problem solved. thanks to all who helped.


这篇关于CComPtr未定义错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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