How can I get IWebBrowser2 size ?
I tried the following code. I will get IWebbrowser2 HWND and get client width and apply to Parent Window. What is something wrong ?
if ( dispIdMember == DISPID_DOCUMENTCOMPLETE) {
IWebBrowser2* pSite = 0;
HWND hWnd;
int nCount = pDispParams->cArgs;
HRESULT hr = ((IDispatch*)pDispParams->rgvarg[1].pdispVal)->QueryInterface(IID_IWebBrowser2, (void**)&pSite);
pSite->get_HWND((SHANDLE_PTR *)&hWnd2); hWnd return NULL
:
SetWindowPos(hParentWnd,NULL,0,0,cxNew,cyNew, SWP_NOZORDER | SWP_NOMOVE );
}