Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

能否在DLL(C++)中操作VB的WebBrowser控件对象?

5 views
Skip to first unread message

莉莉

unread,
Feb 19, 2010, 12:30:05 PM2/19/10
to
在MFC中由于WebBrowser实现了IWebBrowser2接口,我可以通过get_Document方法获得文档中的IDispatch的指针。

LPDISPATCH CWebBrowser2::GetDocument()
{
LPDISPATCH result;
InvokeHelper(0xcb, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}

很明显VB是面向对象的 WebBrowser1.Document 并不能获得 IDispatch指针。

有什么办法可以让我在DLL中获取WebBrowser1文档的LPDISPATCH ?或者说如何操作WebBrowser对象?

0 new messages