Home > Software engineering >  MFC to do a browser application, when click on the button in your web pages automatically switch to
MFC to do a browser application, when click on the button in your web pages automatically switch to

Time:10-09

I use MFC to do a browser application, when click on the button in your web pages automatically switch to 360 browser (browser I install) opened, how to switch to the MFC browser opens, the default home page for this web page, when click on the web pages such as sohu, with I installed 360 browser opens automatically, and why, is there any way to change it

CodePudding user response:

360 very rogue, this is really no solution, feeling from the bottom Hook all the IE operations, unless you are a direct execution iexplore. Exe,
I use this code, in other people's computer was up 360 secured browser, Navigate function directly is invalid, just want to call names, fucking
 HRESULT hr=OleInitialize (NULL). 
If ((hr==S_OK) | | (hr==S_FALSE))
{
The IWebBrowser2 * wb=NULL;
Hr=CoCreateInstance (CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER IID_IWebBrowser2, (void * *) & amp; Wb);
If (hr==S_OK)
{
BSTR bstrUrl=SysAllocString (L "http://bbs.csdn.net/");
If (bstrUrl!=NULL)
{
The VARIANT vtEmpty;
VtEmpty. N=VT_EMPTY;
Hr=wb - & gt; Navigate (bstrUrl, & amp; VtEmpty, & amp; VtEmpty, & amp; VtEmpty, & amp; VtEmpty);
SysFreeString (bstrUrl);
}
Wb - & gt; The Quit ();
Wb - & gt; Release ();
}
OleUninitialize ();
}

CodePudding user response:

I use 360 released software at every time of use, are strictly follow the following steps:
Install
Use the
Uninstall

CodePudding user response:

You deal with the NewWindow2, specific I don't put the code, a casual degrees.

CodePudding user response:

This need you to handle, your own virtual function OnNewWindow2
http://blog.csdn.net/xiangzhang321/article/details/7753177
  • Related