accXXX之类的方法都是跟IAccessible接口相关的,这是DirectUI的基础,accNavigate只是用于DirectUI窗口内部子窗口的导航定位操作,跟浏览器控件无关。CExplore1虽然是从CWnd继承的,但是既然作为容纳浏览器控件的容器窗口,就肯定能通过GetControlUnknown获得浏览器控件的: LPUNKNOWN pUnk = CExplore1::GetControlUnknown(); CComQIPtr<IWebBrowser2> spWb = pUnk; spWb->Navigate2(...)
请问楼上: 我用你的代码,在控件的界面上显示如下,用CHtmlView的Navigate2也出现同样的问题? Action canceled Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable. Please try the following: Click the Refresh button, or try again later. If you have visited this page previously and you want to view what has been stored on your computer, click File, and then click Work Offline. For information about offline browsing with Internet Explorer, click the Help menu, and then click Contents and Index. Internet Explorer
CExplore1的基类是CWnd,都没有Navigate方法,CWND有个accNavigate方法,不好用啊
LPUNKNOWN pUnk = CExplore1::GetControlUnknown();
CComQIPtr<IWebBrowser2> spWb = pUnk;
spWb->Navigate2(...)
我用你的代码,在控件的界面上显示如下,用CHtmlView的Navigate2也出现同样的问题?
Action canceled
Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable.
Please try the following:
Click the Refresh button, or try again later.
If you have visited this page previously and you want to view what has been stored on your computer, click File, and then click Work Offline.
For information about offline browsing with Internet Explorer, click the Help menu, and then click Contents and Index.
Internet Explorer