在VC++中实现Microsoft Agent编程,求源码或者改错
我做了个系统,具体步骤是依照http://www. 步骤做的如下,不知为什么出现错误,希望高手指点一二,感激不尽。一、新建工程myagent:
建立基于对话框的VC++工程MyAgent;
二、在窗口中添加ActiveX组件:Microsoft Agent:
正确安装了“Microsoft Agent”之后,系统中会新增该ActiveX控件可以使用,目前该ActiveX的最高版本是2.0,即“Microsoft Agent Control 2.0”;
利用ClassWizard为“Microsoft Agent”定义成员变量m_sysAgent,即:
CAgentCtlEx m_sysAgent;
2、定义其他变量
首选在CMSagentDlg.cpp中增加引用如下头文件,即:#include "agentctlcharacters.h"
#include "agentctlcharacterex.h"
#include "agentctlrequest.h"
再CMSagentDlg.h 中定义保护变量:CAgentCtlCharacters m_Characters;
CAgentCtlCharacterEx m_Ex;
CAgentCtlRequest m_Request;
做到这运行就开始错误
Compiling...
MSagent.cpp
e:\msagent\msagentdlg.h(22) : error C2079: 'm_Characters' uses undefined class 'CAgentCtlCharacters'
e:\msagent\msagentdlg.h(23) : error C2146: syntax error : missing ';' before identifier 'm_Ex'
e:\msagent\msagentdlg.h(23) : error C2501: 'CAgentCtlCharacterEx' : missing storage-class or type specifiers
e:\msagent\msagentdlg.h(23) : error C2501: 'm_Ex' : missing storage-class or type specifiers
e:\msagent\msagentdlg.h(24) : error C2146: syntax error : missing ';' before identifier 'm_Request'
e:\msagent\msagentdlg.h(24) : error C2501: 'CAgentCtlRequest' : missing storage-class or type specifiers
e:\msagent\msagentdlg.h(24) : error C2501: 'm_Request' : missing storage-class or type specifiers
MSagentDlg.cpp
e:\msagent\msagentdlg.h(22) : error C2079: 'm_Characters' uses undefined class 'CAgentCtlCharacters'
e:\msagent\msagentdlg.h(23) : error C2146: syntax error : missing ';' before identifier 'm_Ex'
e:\msagent\msagentdlg.h(23) : error C2501: 'CAgentCtlCharacterEx' : missing storage-class or type specifiers
e:\msagent\msagentdlg.h(23) : error C2501: 'm_Ex' : missing storage-class or type specifiers
e:\msagent\msagentdlg.h(24) : error C2146: syntax error : missing ';' before identifier 'm_Request'
e:\msagent\msagentdlg.h(24) : error C2501: 'CAgentCtlRequest' : missing storage-class or type specifiers
e:\msagent\msagentdlg.h(24) : error C2501: 'm_Request' : missing storage-class or type specifiers