Windows shell programming 1 (concept)

Source: Internet
Author: User
Tags types of extensions

The operating system shell is defined as a user interface provided by the system. It allows users to execute public tasks, such as accessing the file system, exporting execution programs, and changing system settings. Ms-dos has a command.com role. However, Windows has a graphical interface environment, and its shell program must be graphical. Before Windows 95, the default Windows Shell is the program manager. The program manager is a central console where you can start applications, rearrange and reorganize icons, and execute new tasks. Now the corresponding program manager is the file manager, which is a tool designed specifically to maintain the file system.

With the emergence of Windows 95, detectors have replaced the two old tools and integrated the functions of the two. In general, the concept of detectors is that they are a program, this program starts when you need to browse the file system by clicking "my computer" or right-clicking the "Start" button. In fact, detectors always start and run, starting from boot until you close your computer. Intuition is the "detector", which is actually the window under the new concept. The probe is an executable utility (assumer.exe) that implements the Windows Shell function.

The following describes the components of the shell and the detector structure.

 

Shell Components

Shell is composed of many different parts. Now we are starting from the most obviousDesktopAndTask entryStart.

The desktop is the parent object of all Windows Shell objects, that is, the host object. In terms of implementation, the desktop is a special window of the system-defined window class, and is the ancestor window of all windows. The top-level windows of the exported applications are generally desktop subwindows.

The main Windows Shell component is the task bar, which is actually a window owned by the detector process. Whenever you need to terminate the detector process, the task bar will disappear and reappear. Every time he re-shows, he registers a new window with a different HWND. Therefore, for reference, you do not need to keep the HWND of this window. The task bar also has a "start" button window. In the tray area, sometimes the widget and similar buttons are used to indicate the running application. Job entries are actually the same as windows. You can perform operations on any windows, such as moving, hiding, and subclass.

 

Detector Structure

The detector is an application that plays the role of the system shell. When it comes to shell extension, we are talking about the blocks that have detector-aware, loaded, and finally executed.

In the detector environment, there are basically two types of extensions: Shell extension and namespace extension. In terms of name, the detector is a Windows Shell, so both types of extensions can be used as shell extensions. In other words, both shell and namespace extensions expand detector capabilities. But there are some differences between them.

Shell extension is a customer action that is added to all files of a given type. files of a given type are displayed as per customer requirements in detector observation. In this way, you can call it an extension of shell observation ". Users' behaviors, such as dragging, right-clicking the association menu, drawing icons, and displaying the Properties dialog box, are triggered by a certain number of special events. You can define special processor programs for these events, for example, you can determine to display given events. the icon of the Bmp file, adding a preview page to the properties dialog box for all Windows Meta files, or even adding an executable function to the association menu.

There are two types of namespace extensions, depending on how you connect. If you use a file type to connect to the namespace extension, despite the support of complex code, its function is still equivalent to the extended context menu. However, if you use folders to connect to the namespace extension, the folder will be changed to the customer folder, your code will determine the folder content, icons displayed by the detector, subfolders, sorting, and associated menus.

Related Article

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.