Link: http://blog.csdn.net/cjwn/archive/2009/03/09/3973720.aspx
WTL::CHtmlCtrl这个类,WTL文档中很少有说明,故把这些写下来备忘。
根据WTL 8.0 Final 版本ReadMe.html中的描述,CHtmlCtrl只是把Win32 API的HTML View Control的Handle封装成一个client类。
Windows Template Library
Class Overview
| usage: | mi base | - | a base class (multiple inheritance) |
| client | - | wrapper class for a handle | |
| as-is | - | to be used directly | |
| impl | - | implements a window (has WindowProc) or other support | |
| helper | - | a helper class | |
| base | - | implementation base class |
| class name: | usage: | description: |
| CHtmlCtrl | client | HTML control |
1. 在CHtmlControl::AddText()之后需要调用CHtmlControl::EndofSource()函数通知控件。否则显示一个HTML sourcecode会要等很久。
2. 需要在工程文件中包含以下头文件和库:
3. IWebBrowser2 的接口在Windows Mobile 6上是不支持的。
IWebBrowser2 *pWebBrowser2= NULL; // No Interface on Windows Mobile 6
4. 如果链接时候(Link)出现 IDD_IPIEHTMLDocument 未定义的错误,需要在源代码中添加对于IDD的定义。
本文档介绍了WTL库中的CHtmlCtrl类使用方法,包括如何正确显示HTML内容及所需的头文件和库。特别强调了在使用CHtmlCtrl::AddText()后必须调用CHtmlCtrl::EndofSource(),并提供了在Windows Mobile环境下不支持IWebBrowser2接口的注意事项。
&spm=1001.2101.3001.5002&articleId=4225286&d=1&t=3&u=e7e74adf17504b89b9aef2fde8a6d4a0)
746

被折叠的 条评论
为什么被折叠?



