Explorer in the Explorer of the custom browser good assistant (1)

Source: Internet
Author: User
Tags object model win32
Explorer in IE search custom browser good assistant
(Author: Green Apple Studio compiled February 08, 2001 14:00)
In some cases you need a specially crafted browser that is more or less changed. In this case, you sometimes develop a fully customizable module based on the WebBrowser control, implementing buttons, headers, and other things the user interface needs. At this point, you are free to add any new, non-standard features to this browser. The WebBrowser control is just a browser's parsing engine. This means that there are a lot of user interface related tasks that must be done by you: add address bars, toolbars, history, status bar, channels, favorites, and so on. So, to create a custom browser, you have to write two kinds of code: turn the WebBrowser control into a full-featured browser-like code for Microsoft Internet Explorer and code that supports your new functionality. Wouldn't it be nice if there was a direct way to customize Internet Explorer? The browser Helper object (BHO) is used to do this.
Program Customization
Historically, the first method of customizing the behavior of a program is a subclass. In this way, you can change the way a given window handles messages in a program to get a different behavior. This is an original implementation, however, because the victim is rarely aware that this is the only option for a long time.
When the Microsoft Win32 API appears, it is not encouraged to use subclasses of processes, and their code is more difficult to write. However, if you have a brave heart, the pointer never frightens you, after all, you live in a system-linked environment, you may find it is actually very simple. But that's not always the case. No matter how clever the programming, there is a problem that every WIN32 process runs in its own address space, and sometimes breaking the boundaries of such a process is incorrect. On the other hand, it requires you to do your best to complete this programming. More often, customization may refer to the specified functionality that the program itself determines at design time.
Later, the program looks for additional modules in well-known, predetermined disk space, loads, initializes them, and then lets them complete the pre-designed work. This is how Internet Explorer and its helper objects actually work.
What is the browser helper object (BHO)
From this point of view, Internet Explorer is just like any other WIN32 program that uses its own memory space. You can write components using the browser Helper Object--the Component Object Model (COM) component in the process--internet Explorer loads these components at each startup. These components and browsers run in the same memory context and can perform any operation in the available Windows and modules. For example, a BHO can detect typical browser events, such as GoBack, GoForward, and documentcomplete, access browser menus and toolbars, and change them, create Windows to display additional information on the current visual page, and install hooks to monitor messages and actions. To put it simply, BHO like the spy we sent to sneak into the browser.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.