Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Dec 12, 2007 5:17 am Post subject: HOWTO : Make a IE toolband/bandobject visible by default when IE starts up |
|
|
To make a IE toolband or a horizontal/vertical bandobject visible by default when IE starts up, use a BrowserHelperObject. Add a new BrowserHelperObject to your project (Project-->Add New item-->EZShellExtensionsMFC-->BrowserHelperObject) and in the OnLoad method, use the following code :
VARIANT varTrue;
varTrue.vt = VT_BOOL;
varTrue.boolVal = true ;
VARIANT varClsid;
varClsid.vt = VT_BSTR ;
CString strGuid;
strGuid= _T ("{<<GUID of your explorer bar>>}"); // eg :"{BDB85E7A-CF09-45b4-B6CA-20C0633C8A8B}"
varClsid.bstrVal = strGuid.AllocSysString();
IWebBrowser2* wb = this->GetWebBrowser();
wb->ShowBrowserBar(&varClsid,&varTrue,NULL); |
|