C ++ Builser master advancement (6) Add button in the IE toolbar

zhaozj2021-02-16  48

C builser master advanced

nxyc_twz@163.com

(6) Add button in the IE toolbar

Browser IE is one of our most frequent software. If you can integrate an application into IE, it will greatly facilitate the user's operation and improve software add-on. Fortunately, Microsoft has provided us with the corresponding interface, which makes our work simple and fun.

First, system analysis

Through the analysis of the registry, comparison, you can find that the setting of the IE toolbar button is in the location of the registry:

HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Internet Explorer / EXTENSITIONS /

This way we can implement our goals through the following steps: add buttons to the IE toolbar

1. Add a primary key to the path, the key name is arbitrary, such as: 5D13E8D2-850A-101B-ARC0-4210102A8DA7;

2. Add the following strings to the above primary link:

n ButtonText: Button Display Text

n CLSID: Identifier, must be set to: {1FBA04EE-3024-11D2-8F1F-0000F87ABD16}

n Default Visible: Set whether the button is displayed

n exec: Click the button to call the application

n icon: button icon

N Hoticon: Floating icon for button

Second, the design process

Tregistry rg = new tregistry;

Rg-> rootkey = HKEY_LOCAL_MACHINE

Rg-> Openkey ("Software / Microsoft / Internet Explorer / Extensions / {5D13E8D2-850A-101B-ARC0-4210102A8DA7}", TRUE);

Rg-> WritestRing ("ButtonText", "Button Name");

Rg-> WriteString ("CLSID", "{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}");

Rg-> WriteString ("default visible", "yes");

Rg-> WritestRing ("Exec", "Application Path");

Rg-> Writestring ('"icon", "icon path");

Rg-> Writestring ("Hoticon", "Floating Icon Path");

Rg-> CloseKey ();

Delete rg;

转载请注明原文地址:https://www.9cbs.com/read-26437.html

New Post(0)