实现瑞星小助手——Microsoft Agent is a free desktop/web technology

记得以前老师在讲PPT的时候桌面上经常会跳出瑞星的小助手,动画甚是可爱伴随有各种各样的动作和声音。这种技术是如何实现的呢?


[关于"Microsoft Agent"技术的介绍]

Microsoft Agent is a free desktop/web technology for Microsoft Windows 98/2000/XP/Vista featuring animated characters that support text-to-speech (TTS) in 11 different languages.

Microsoft Agent is not an application that you can just run (like Word or Excel) and expect to have characters automatically do things for you.   Applications and Websites must be specifically programmed to utilize Microsoft Agent and provide these capabilities for you.  Many of these can be found around our ring.

Additional information and documentation can be found on the Microsoft Agent Home Page.
http://www.microsoft.com/products/msagent/main.aspx

System requirements
Windows® XP/2000/NT4/Me/9x or later
Internet Explorer version 4.0 or later
A Pentium 100-MHz PC (or faster)
At least 16 MB of RAM
At least 1 MB free disk space for the core components
An additional 2-4 MB for each character you install.
An additional 32K for each language component (dll).
Recommended
An additional 1.6 MB free disk space if you plan to use the Lernout & Hauspie® TruVoice Text-To-Speech Engine for speech output
An additional 22 MB free disk space if you plan to use the Microsoft Speech Recognition Engine for speech input
A Windows-compatible sound card
A compatible set of speakers and microphone

How to use see: http://www.msagentring.org/setup.aspx
More info see:
http://www.msagentring.org/


[Microsoft Agent技术在VC6中的使用方法]

[1] 建立一个基于对话框的应用程序Myagent

[2] 在主窗体中中添加ActiveX组件
正确安装了Microsoft Agent之后,系统中会增加该ActiveX控件,目前该ActiveX的最高版本是2.0,即Microsoft Agent Control 2.0。添加完Microsoft Agent Control 2.0之后就可以在Controls面板上找到这个控件,然后将它添加到主对话框上。

[3] 定义变量
利用ClassWizard(Ctrl+w)为Microsoft Agent控件定义成员变量:m_agent
然后再定义相关变量:

[4] 添加响应代码
根据需要将动画载入的代码添加到合适的位置(即我们需要显示动画的位置)。具体代码如下:


[5] 响应相关动画动作
通过调用相关函数来控制动画完成各种动作。如显示、隐藏、文本提示、做动作等。例如,让动画表示欢迎动作则可调用m_characterEx.Play("greet")来完成。具体的操作可参考控件的帮助文件。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值