求助:外程序如何获取IE窗口的文档对象指针
请教:外程序如何访问获取IE窗口的文档对象指针,以访问其页面元素?
或者,我已经获得IE窗口的句柄,如何从窗口句柄获得其文档对象指针呢?
请各位不吝赐教,不胜感谢!!
问题点数:20、回复次数:3Top
1 楼shl6894(越学越无知)回复于 2006-12-01 08:34:47 得分 0
CMainFrame *pFrame=(CMainFrame*)AfxGetMainWnd();
CXXXView* pView=(CXXXView*)pFrame->GetActiveDocument();Top
2 楼lion_wing(凤之焚-业与情的纠缠,死而复生的蜕变!)回复于 2006-12-01 10:42:07 得分 20
The first get IWebbrowser2 from HWND of IE:
http://blog.csdn.net/lion_wing/archive/2006/05/26/756105.aspx
And then get IHTMLDocument2 from IWebbrowser2:
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/iwebbrowser2/document.asp
Top
3 楼canntloveumore()回复于 2006-12-01 11:47:40 得分 0
shl6894,你的方法是程序内的,还是谢谢你.
lion_wing,你的信息很有帮助,很感谢!Top





