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的定义。