Microsoft Windows Registry Guide, Second Edition

ControlPanel

The key HKCU\Control Panel has a wealth of customization possibilities. This is the key where Windows stores most of the settings you configure in Control Panel. The most interesting subkeys are Desktop and Mouse. The following list gives you an overview of what's in most of the subkeys, and I describe the Desktop and Mouse subkeys in more detail in the sections following this one:

Desktop

The values in HKCU\Control Panel\Desktop control many aspects of the Windows user interface. A good number of them don't have a user interface for configuring them, however, so there's a lot of potential in this subkey for customizing the operating system. The following list describes these values:

I left the value UserPreferencesMask out of the list because this value represents some of the most interesting and most useful ways to customize Windows. It's also more complicated than other values in the list because it's a bit mask that contains a large number of settings in one value. Lately, Microsoft has stayed away from using large bit masks like this one, favoring REG_DWORD values that you set to 0x00 to disable a feature and 0x01 to enable a feature. This value is a holdover from earlier versions of Windows, however. It's a 4-byte REG_BINARY value that might as well be a REG_DWORD value. The default value is 0x80003E9E, which will make more sense after you know what the different bits in this value represent.

Table C-1 describes each bit. Because this is a REG_BINARY value, count the bits from left to right, beginning with 0. If this were a REG_DWORD value, you'd count the bits from right to left instead. The table indicates each setting's bit number, describes the feature that it controls, and shows the bit mask. For any feature you see in the table, setting the bit to 0 disables the feature and setting it to 1 enables the feature. If you'd like to see an example of writing a script that changes settings in UserPreferencesMask, see Chapter 4, “Hacking the Registry.” Chapter 4 contains a script that updates this value to cause Windows to raise windows to the foreground when you point at them. For more information about doing bitwise math, see Chapter 1, “Learning the Basics.”

Table C-1 Bits in UserPreferencesMask

Bit

Bit Mask

Default

Description

0

0x00000001

0

Active window tracking. Windows get focus when the user positions the mouse pointer over them.

1

0x00000002

1

Menu animation. This depends on the value of bit 9.

2

0x00000004

1

Combo box animation. The combo boxes slide open.

3

0x00000008

1

List box smooth scrolling. The list boxes scroll smoothly.

4

0x00000010

1

Gradient captions. The title bars display a gradient.

5

0x00000020

0

Keyboard cues. Menu hotkeys are underlined only when accessed from the keyboard.

6

0x00000040

0

Active window tracking Z order. Windows that gain focus through active window tracking are brought to the foreground.

7

0x00000080

1

Mouse hot tracking.

8

0x00000100

0

Reserved for future use.

9

0x00000200

1

Menu fade animation. Menus fade when closed; otherwise, menus use slide animation.

10

0x00000400

1

Selection fade animation. Lists fade after users make a selection.

11

0x00000800

1

ToolTip animation. This depends on bit 12.

12

0x00001000

1

ToolTip fade animation. ToolTips fade when they close. When the bit is set to 0, ToolTips use slide animation.

13

0x00002000

1

Cursor shadow. This requires more than 256 colors.

31

0x80000000

1

All user-interface effects. This enables combo box animation, cursor shadow, gradient captions, hot tracking, list box smooth scrolling, menu animation, menu hotkey underlining, selection fade, and ToolTip animation.

Desktop\WindowMetrics

The key HKCU\Control Panel\Desktop\WindowMetrics contains settings that govern the dimensions of the elements you see on the screen. Some of these settings represent dimensions in pixels, whereas others are actually coordinates. The following list describes the settings in WindowMetrics, which you define by clicking Advanced on the Display Properties dialog box's Appearance tab, as shown in Figure C-3.

Figure C-3 After you've configured the settings in this dialog box, consider exporting them to a REG file so that you can use the same settings on other computers.

Mouse

The values in HKCU\Control Panel\Mouse configure the mouse. The following list describes these values, including their types and default values:

Категории