IHTMLDocument2 *pDoc2; IDispatch *WebDocument=static_cast(CppWebBrowser1->Document); pDoc2=static_cast(WebDocument);或者直接用QueryInterface。