"IWebBrowser2::ToolBar Property" broken in IE7 RC1 ?
If some java script hide my toolbar i use the following code to show it :
STDMETHODIMP CSMBar::DocumentComplete(IDispatch* pDisp, VARIANT* URL)
{
CComPtr<IWebBrowser2>
pWebBrowser(m_pReflectWnd->GetToolBar().GetBrowser());
if(pWebBrowser != NULL)
{
BOOL bIsFeature;
VARIANT_BOOL vbIsFeature = true;
if( pWebBrowser->get_ToolBar(&bIsFeature) == S_OK &&
bIsFeature == FALSE )
{
pWebBrowser->put_ToolBar(VARIANT_TRUE);
}
}
return S_OK;
}
This worked fine in IE6 and IE7 beta2 but since IE7 beta 3 the code is not working.
I am seeing similar behavior. My web application installs a client-side control that uses IWebBrowser2::ToolBar to enable / disable the IE menu bar and toolbars. Under IE7 RC1 this works if my application is running in the _only_ IE7 tab; if other tabs are open enabling / disabling the toolbar has no effect. I can see why the tab bar isn't being hidden with more than one tab open, but not why other toolbars are not -- seems like they should be enabled / disabled as appropriate for the active tab (the menu bar works this way).
Thoughts? Suggestions for a workaround? Thanks!