Hi,
I am trying to get the IDispatch for an HTML Control using the
DTM_BROWSERDISPATCH message. Here is some of my code:
IDispatch* pDisp = 0;
IWebBrowser2* pWebBrowser = 0;
SendMessage(hWndHtml, DTM_BROWSERDISPATCH, 0, (LPARAM) pDisp);
HRESULT hr = pDisp->QueryInterface(IID_IWebBrowser2, (void**) pWebBrowser);
if (FAILED(hr)) {
hr = S_OK;
}
long hi;
pWebBrowser->get_Height(&hi);
The problem is that after the sendmessage, the IDispatch pointer is still
NULL. Does anyone know how to solve this? Thanks.