How to add buttons to IE toolbar

zhaozj2021-02-16  178

How to add buttons to IE toolbar Add button Zhejiang Wenling City Telecom Bureau Wang Jun

Original address: http://www.vckbase.com/document/viewdoc/? id = 190 sample code: http://www.vckbase.com/document/iournal/vckbase9/src/iebutton.zip

Problem Suit: Jinshan word tyrants, network ants and other software will add their own buttons to IE. The corresponding action will be made after pressing the button. How is this function implementation? After reading this article, you can also add your own buttons to the toolbar of the IE.

Basic Principle: Starting from IE5 Allows us to add your own buttons to the toolbar, the essence is the modification of the registry and add the information you need to create this button.

Implementation steps: 1. GUID (Globally Unique Identifier) ​​created this button You can generate GUID through Guidgen.exe in Visual Studio. For example, I generated is {1FBA04EE-3024-11D2-8F1F-0000F87ABD16} The following example I use this GUID to make an instructions.

2. Create a sub-key hkey_local_machine / software / microsoft / Internet explorer / extensions / {1FBA04EE-3024-11D2-8F1F-0000F87ABD16}

3. Create the following string value under this subkey. (1) CLSID This is the CLSID of IE, which must be {1FBA04EE-3024-11D2-8F1F-0000F87ABD16} (2) Default Visible indicates whether this button is visible in the default state, YES is visible, NO is invisible (3) ButtonText button text (4) Icon's Icon's full path, such as C: /Vckbase.ico. It can also be an icon included in the Exe file, such as: C: /Progra ~ 1/netants/netants.exe, 1000 (5) Hoticon Mouse moving icon full path

The following subkey needs to be executed after pressing the button: It can be a COM object, browser, Explorer Bar, script Script, executable. Below we will introduce one by one. 1COM object You need to create a string value called CLSIDEXTENSITION, which should use CLSIDEXTension to call your COM object for the GUID of this COM object, for example, using CLSIDEXTension.

2 Browse strips Explorer bar so-called browse strips is similar to the historical list that is opened after the IE history button, which is better than the CREBAR object in the MFC. The browsing strip can also be made, because it is exceeded the scope of this article, it will not be explained. In order to open a browse strip after pressing the button, you need to build a string value named BANDCLSID, which is the CLSID of the browsing strip.

3 Script Script Press the script executed after the button, for example: "% systemroot% / Web / related.htm" You can add the script in this HTML file to get the current lot of information, need to pay attention to if you want to pass Script opens non-script HTML files that are not feasible. Please refer to the following Netants to get the script code for all links of the current page.