In-depth transformation of Win2000 "location bar"

  

Compared with the previous Windows, Win2K/XP user interface has made many improvements, greatly facilitating users to use Windows. For example, "Active Desktop" is based on HTML, which is a huge change for Windows NT 4.0 users. Whether you like it or not, the new user interface gives experienced users the opportunity to customize their desktops, enabling people to do their daily work more efficiently. The "Open" dialog is one of the most commonly used dialogs. In the Win 2K/XP user interface, it adds a "location bar". This article will discuss how to customize this position bar.

The description of this article is mainly for Win 2K, but the basic principles are equally applicable to XP. The differences will be pointed out separately.

First, the "Open" dialog box

Perhaps you have noticed that some software running under Win2K/XP, their "open" dialog box with Win9x/NT 4.0 different. Figure 1 shows the standard Win2K Open dialog box. Click on the File/Open menu in Notepad to display the dialog. Compared to the previous operating system, this dialog adds a new thing: a vertical button bar has been added to the left side of the window. Win2K's SDK documentation refers to this button bar as the "Places Bar".

Figure 1: Standard Win2K "Open" dialog box

The role of the position bar is to allow users to reach frequently used folders with a single mouse click. The Win2K/XP location bar contains up to 5 buttons, each pointing to a system folder. Click on any of the buttons and the "Open" dialog will immediately display the contents of the corresponding folder.

The default location bar provides a button for each of the following folders: History, Desktop, My Documents, My Computer, My Network Places. The History folder records the files and folders that the user has recently used. If you want to access recently used files or folders, the History folder is the first place to view. Many users also often use the other four folders.

The default location bar configuration contains the most commonly used folders for most users, meeting the needs of most users. However, this default configuration may not be suitable for your work habits, then you have to customize it.

Second, custom location bar

No matter where the registry or somewhere else, the various folders of the location bar are not explicitly listed. Therefore, Win2K/XP always uses standard position bars unless a new set of locations is created automatically or by program.

A location bar is a system-level resource. Once a set of locations is assigned to a location bar, all Win2K/XP software will use this set of locations. This restriction means that you can't specify a configuration for Notepad's location bar and another configuration for the brush's location bar. All programs running under Win2K/XP share the same set of locations - regardless of the set of locations. Is it standard or customized? (Office exception, it can have a different set of locations, which will be discussed in detail later).

To specify a new set of folders for the location bar, the first step is to tell the system that you are not going to use the default of five locations. Create the HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesComDlg32Placesbar registry subkey (generally, the Plicies subkey may already exist, but the ComDlg32 subkey needs to be created by itself). After creating this subkey, you can see that the position bar of the "Open" dialog has become blank. The Placesbar subkey tells Win2K that you don't want to use the standard location combination, but you haven't specified your own configuration yet.

The Placesbar subkey contains up to 5 entries, from Place0 to Place4. Win2K/XP does not recognize or correctly handle registration keys for Place5, Place6 or other names. Locations should be specified in order, for example, Place0 and Place2 cannot be set to miss Place1. If the location of the registry settings is messy and incomplete, the location bar will display the icon and folder names in an unpredictable order.

When adding location information to the Placesbar subkey, the way to specify the folder is to provide the full path name of the folder as a string. The type of registration data is REG_SZ (if the environment variable is used in the folder name, it should be REG_EXPAND_SZ).

Copyright © Windows knowledge All Rights Reserved