ATL implements customized IE Explorer bars, toolbars, and desktop toolbars

Source: Internet
Author: User
Tags command line

First, the introduction

Recently, due to the requirements of the work, I need to do some development work on IE. So I went through some of the information on MSDN, and on the MSDN note I accomplished the "capitalist Boss" assignment with ATL.

(and in the daytime sleep in the process of the dream of the boss gave me a pay increase ...) )

Now, I have translated the original information on MSDN and Fengxian the implementation of an ATL to the friends on Vckbase.

Second, the concept

In the process of translating, there are two words that are very difficult to understand. The first word is the Band object, the dictionary translates as "Edge, skirt edge, belt, band ..." My English proficiency is limited, I really do not know how to translate the words more appropriate. So I resolutely decided: in the following discussion, still use the word band! What You don't understand? I mean, I don't translate the word anymore, but how do Band objects understand that? Please look at figure one:

Figure I

The red circle in figure one is called "Vertical Explorer Bar", "Horizontal Explorer Bar", "Toolbar", and "Deskbar". These "columns" can be displayed or hidden in the View menu of IE or the contextual shortcut menu in the right mouse button. The implementation of these interface windows, in fact, is to implement a COM interface object, and this object is called Band. This concept can only be understood and can not be explained, I can not in the article translated it as "always rely on IE main window of the object" bar? ^_^

In addition, there is a word called site. This is very good translation, called "Site"!. Oh, I dare to pack a ticket, if you want to be able to understand the meaning of this translation in the Computer class article, that can only congratulate you, your wisdom is too high. (Are all computer software people, the gap in life is so big?) In this article, site can understand: IE's main frame around, is like "bus Station", those band objects, like "car". Band cars can always be parked at the "bus Stop". So, site is the "Web", it is also the object of COM interface (IObjectWithSite, iinputobjectsite).

Three, principle

3.1 Basic Band objects

Band object, starting with Shell 4.71 (IE 5.0) to provide support. Band is a COM object that must be placed in a container to use, of course, using them as if using a normal window is the same. IE is a container, the desktop Shell is also a container, they provide different function functions, but the basic implementation is similar.

The Band object is divided into three types, the Explorer Bar Band (explorer bands), the toolbar Band (Tool bands), and the Desktop toolbar (Desk bands), while the browser bar Band has two manifestations: vertical and horizontal. So how does IE and the Shell differentiate and load these bands objects? The method is to register different component types (CATID) in the registry for different band objects.

Band style Component type CATID
Vertical Explorer Bar Catid_infoband 00021493-0000-0000-c000-000000000046
Horizontal Explorer Bar Catid_commband 00021494-0000-0000-c000-000000000046
Toolbars for the desktop Catid_deskband 00021492-0000-0000-c000-000000000046

The IE toolbar does not register with the component type, but instead uses the registration method for the CLSID. For more information, see 3.3.

In the example program, the implementation of all four types of band objects, vertical Explorer Bar (cverticalbar) shows an HTML file, and implementation of the IE main window to browse the Web page navigation and other functions; The horizontal Explorer Bar (Chorizontalbar) is an editing window, It synchronizes the contents of the body source file of the current Web page; IE Toolbar (CToolBar) is the simplest, just adds an empty toolbar; The Desktop toolbar (Cdeskbar) implements a Single-line editing window where you can enter a command line or file name, which executes the Shell when you return. The open action.

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.