ICustomDoc failing
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I am calling the below piece of code in DocumentComplete Event from IE.
CComPtr<IDispatch> spDisp; RESULT hr = m_spWebBrowser2->get_Document(&spDisp); if (SUCCEEDED(hr) && spDisp) { CComQIPtr<ICustomDoc, &IID_ICustomDoc> spCustomDoc(spDisp); }
The spCustomDoc Object is invalid. I am catching events from IE, and not from any webbrowser control in application. Any idea whats going wrong?I am not sure whether we can use SetUIHandler for browsers. Thanks in Advance. Abhi Lahare.