我用ShowBrowserBar显示工具条,总是停在地址栏右边显示为一小条,而GOOGLE的却是单独的一行显示在地址栏下面(都是第一次使用,也就是注册表中没有工具条位置信息的时候)......MSDN中ShowBrowserBar函数的说明:ShowBrowserBar Method Internet Development Index --------------------------------------------------------------------------------Shows or hides a specified browser bar.Syntaxobject.ShowBrowserBar( _
vClsID As Variant, _
[bShow As Variant,] _
vSize As Variant)
ParametersvClsID
Variant of type String that specifies the class identifier of the browser bar to show or hide. This object must be registered as an Explorer Bar object with the CATID_InfoBand component category. For more information, see Creating Custom Explorer Bars, Tool Bands, and Desk Bands.
bShow
Optional. Variant of type Boolean that specifies if the browser bar should be shown or hidden. false
Browser bar is hidden.
true
Browser bar is shown.vSize
Not currently used.
ResThe WebBrowser object ignores this method.A View menu item in Microsoft Internet Explorer enables users to show or hide browser bars, which are also known as Explorer Bars.The standard browser bars use the following class identifiers: Browser Bar Name Class ID
Search {30D02401-6A81-11D0-8274-00C04FD5AE38}
Favorites {EFA24E61-B078-11D0-89E4-00C04FC9E26E}
History {EFA24E62-B078-11D0-89E4-00C04FC9E26E}
Channels {EFA24E63-B078-11D0-89E4-00C04FC9E26E}
其中的vSize真的没有用吗?那么GOOGLE的工具条如何做到的?
vClsID As Variant, _
[bShow As Variant,] _
vSize As Variant)
ParametersvClsID
Variant of type String that specifies the class identifier of the browser bar to show or hide. This object must be registered as an Explorer Bar object with the CATID_InfoBand component category. For more information, see Creating Custom Explorer Bars, Tool Bands, and Desk Bands.
bShow
Optional. Variant of type Boolean that specifies if the browser bar should be shown or hidden. false
Browser bar is hidden.
true
Browser bar is shown.vSize
Not currently used.
ResThe WebBrowser object ignores this method.A View menu item in Microsoft Internet Explorer enables users to show or hide browser bars, which are also known as Explorer Bars.The standard browser bars use the following class identifiers: Browser Bar Name Class ID
Search {30D02401-6A81-11D0-8274-00C04FD5AE38}
Favorites {EFA24E61-B078-11D0-89E4-00C04FC9E26E}
History {EFA24E62-B078-11D0-89E4-00C04FC9E26E}
Channels {EFA24E63-B078-11D0-89E4-00C04FC9E26E}
其中的vSize真的没有用吗?那么GOOGLE的工具条如何做到的?
解决方案 »
- 存储过程:请教"语法错误或违反访问规则"是怎么回事啊?
- 专线接入问题请教?
- 求助:DELPHI中如何定义和使用动态数组
- delphi安装问题
- 为什么用这条语句备份Access数据库提示说无效的SQL语句
- 哪里有比较好的自荐书封面参考,(黑白,彩色都可以)?
- 给60分! 我如何才能在timage上再画上一个位图呢?我用imageA.canvas,draw(1,1,imageB)不行啊,程序提示说只有timage里装个位图才可以画,
- 如何解决PageControl控件标签名颠倒
- 各位那个函数可以判断是否已有一个相同的from建立!
- 在做元件时怎样加入Items属性(十万火急)
- 请教如何实现:类似天气预报,当鼠标移到图上北京方块时,出现包含温度风力等的小提示框?在线等!
- 在登陆时怎样验证特殊字符?
我知道这个结构,但这个结构是在GetBandInfo事件中使用的,难道ShowBrowserBar的第三个参数也是这个?请明示
{
if (NULL != pUnkSite)
{
IWebBrowser2 *pBrowser = NULL;
// Ensure that our site is an browser window
HRESULT hr = pUnkSite->QueryInterface(IID_IWebBrowser2, (void **) &pBrowser);
if (SUCCEEDED(hr))
{
// Display the band object (the Search bar in this case)
VARIANT vtBandGUID, vtShow;
vtBandGUID.vt = VT_BSTR;
//把这里的CLSID换成你的工具条CLSID
vtBandGUID.bstrVal = SysAllocString(OLESTR("{30D02401-6A81-11D0-8274-00C04FD5AE38}"));
vtShow.vt = VT_BOOL;
vtShow.boolVal = true;
pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, 0);
SysFreeString(vtBandGUID.bstrVal);
pBrowser->Release();
}
}
return S_OK;
}
我已经实现BHO,也使用了ShowBrowserBar,但SHOW出来却停在地址栏右边,显示一小条....要拉出来TO aiirii(ari-爱的眼睛):
是的,我也注意到注册表中:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar\WebBrowser\ITBarLayout
键下是保存的位置信息,但却不知道这串二进制数据的格式...
删除这个键值的话,启动IE,GOOGLE的工具条会单独一行显示出来,而一般的却根本没有显示....
一天一次都不行呀?
否
function GetBandInfo(dwBandID, dwViewMode: DWORD; var pdbi: TDeskBandInfo):
HResult; stdcall;
(pdbi.dwModeFlags := DBIMF_BREAK;)
DBIMF_BREAK = $0100;
结贴...