积极答复者
error1400,无效窗口句柄

问题
-
VARIANT v;
CComQIPtr<IWebBrowser2> m_spBrowser;
CAxWindow wndIEHost=GetDlgItem(IDC_EXPLORER2);
HRESULT hr=wndIEHost.QueryControl(IID_IWebBrowser2, reinterpret_cast <void**> (&m_spBrowser) );
WTL::CString str;
str.Format(_T("%d"),GetLastError());
MessageBox(str);
我想获得窗体中webbrowser控件的对象,来引导它的链接,但是getlasterror返回1400,是无效窗口句柄,经过测试m_spBrowser是空的,请问这个问题有解决的办法吗