IWebBrowser2::Navigate2 problem with IE8 on Win7
-
Creating webbrowser as below
hret=CoCreateInstance(clsid,NULL,CLSCTX_ALL,IID_IUnknown
,reinterpret_cast<void**>(&m_pUnknown));hret=m_pUnknown->QueryInterface(IID_IWebBrowser2,(PVOID *)&m_pBrowser);
ASSERT(SUCCEEDED(hret));but when i say HRESULT hret = m_pBrowser->Navigate2(varURL,&noArg,&noArg,&noArg,&noArg); its opening new IE window on WIn7. But in Xp sys its not happening like that. I dont want to open new IE window Any one has any idea why it is opening on new IE window on Win7
-
Creating webbrowser as below
hret=CoCreateInstance(clsid,NULL,CLSCTX_ALL,IID_IUnknown
,reinterpret_cast<void**>(&m_pUnknown));hret=m_pUnknown->QueryInterface(IID_IWebBrowser2,(PVOID *)&m_pBrowser);
ASSERT(SUCCEEDED(hret));but when i say HRESULT hret = m_pBrowser->Navigate2(varURL,&noArg,&noArg,&noArg,&noArg); its opening new IE window on WIn7. But in Xp sys its not happening like that. I dont want to open new IE window Any one has any idea why it is opening on new IE window on Win7
-
It's quite possible (and not unknown) for later versions to contain stricter interpretation of optional parameters. The documentation[^] shows how to set the required behaviour.
Use the best guess
I tried a lot on this but couldn't able to resolve this Can any one help?
-
I tried a lot on this but couldn't able to resolve this Can any one help?
-
narasingubhanu wrote:
I tried a lot on this but couldn't able to resolve this
Tried what, and what results did you get? Please don't expect people to be able to guess what you have done.
Use the best guess
HRESULT hret = m_pBrowser->Navigate2(varURL,&varFlag,&vFrame,&noArg,&noArg); I passed browser constants and frame also but still its opening in new window and if i call any browser function after that its crashing ex:m_pBrowser->get_Busy(&bBusyFlag); //crash application
-
HRESULT hret = m_pBrowser->Navigate2(varURL,&varFlag,&vFrame,&noArg,&noArg); I passed browser constants and frame also but still its opening in new window and if i call any browser function after that its crashing ex:m_pBrowser->get_Busy(&bBusyFlag); //crash application
-
Thanks for suggession. if you want compelte problem here it is I am printing htnl doc from url. In xp with out opening new IE browser we will get file save dialog while printing the doc File save dialog opens at m_pBrowser->ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER,&noArg,&noArg); at this point if you press Alt+tab you can see IE icon. but in Win 7 directly opening IE window at Navigate2 function