- char str[128];
- GetClassName(hwnd,str,sizeof(str));//获取类名
- if(strcmp(str,"Internet Explorer_Server")==0)
- {
- CoInitialize( NULL );
- HINSTANCE hInst = ::LoadLibrary( _T("OLEACC.DLL") );
- CComPtr<IHTMLDocument2> spDoc;
- LRESULT lRes;
- UINT nMsg = RegisterWindowMessage( _T("WM_HTML_GETOBJECT") );
- SendMessageTimeout( hwnd, nMsg, 0L, 0L, SMTO_ABORTIFHUNG, 1000, (DWORD*)&lRes
通过窗口句柄,获取IE控件里的内容(获取IHTMLDocument2和HTML)
最新推荐文章于 2022-04-12 18:26:32 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)