AddToolBarBtn
(IE5Tools)
Function
AddToolbarBtn(ConnType: TconnType;
MenuText, StatusBarText, GuidOrPath:
string; HelpMenu: Boolean): string;
|
Parameters:
-
ConnType
Can have one of following values:
EXPLORER_BAR inf the toolbar button
opens an Explorer Bar.
COM_OBJECT if the toolbar button
implements a Com-object.
The COM object must implement
IOleCommandTarget. If your COM object needs to
access the DHTML Object Model of the page that
Internet Explorer is looking at, you must
implement IObjectWithSite.
The implementations of IOleCommandTarget's
methods are standard, except for
IoleCommandTarget.Exec. The COM object's IOleCommandTarget.Exec
method is called with nCmdID=0 if the
toolbar button or menu item is clicked. This
difference allows developers to provide
different behaviors for the toolbar button and
the menu item.
When IObjectWithSite is implemented,
Internet Explorer will call
IOleObjectWithSite.SetSite and pass it a
pointer to IShellBrowser.
EXECUTABLE if the toolbar button
runs an .exe-file.
SCRIPT if the toolbar button runs a
script-file.
BtnText
Set the value of BtnText to the label
you want for the toolbar button.
StatusBarText
Set the value of MenuStatusBar to the
text you want displayed in the status bar when
the menu item is highlighted. This text should
describe what the script associated with this
menu item will do.
HotIcon
Set the value of HotIcon to the full
path of the .ico file that contains the three
color icons.
Icon
Set the value of Icon to the full path of
the .ico file that contains the three grayscale
icons.
GuidOrPath
If ConnType is COM_OBJECT or
EXPLORER_BAR: Set the value equal to the
GUID of the COM object.
If ConnType is EXECUTABLE or SCRIPT: Set
the value to the full path to the executable
file or to the script.
The function
returns the GUID created for the Toolbar Button.
Use RemoveToolbarBtn(BtnText) to remove the
toolbar button from IE5 and registry.
Links:
Adding
Toolbar Buttons
Toolbar Button Style Guide
|