已經包含了#include <atlcom.h> #include <comutil.h>還是報錯
在WTL工程的.h中
#include <atlbase.h>
#include <atlcom.h>
#include <atlcomcli.h>
#include <atlctl.h>
#include <atlwin.h>
#include <comutil.h>
結果還是下面一堆錯,為什么呢,因為你沒有使用這個using namespace ATL; 加上這個下面錯全部消失。
error C2061: syntax error : identifier 'CComQIPtr'
error C2504: 'CWindowImpl' : base class undefined
error C2065: 'CRegKey' : undeclared identifier
error C2660: 'SetWindowTextW' : function does not take 1 arguments
error C2039: 'SubclassWindow' : is not a member of 'xxxxxx'

浙公網安備 33010602011771號