Dec 052017
 
PC Magazine volume 12 number 02 - CHANGER utility for Windows 3.1.
File V12N02.ZIP from The Programmer’s Corner in
Category Files from Magazines
PC Magazine volume 12 number 02 – CHANGER utility for Windows 3.1.
File Name File Size Zip Size Zip Type
BITFONTS.C 9628 2560 deflated
BITFONTS.DEF 238 147 deflated
BITFONTS.EXE 24633 12594 deflated
BITFONTS.H 382 166 deflated
BITFONTS.MAK 354 158 deflated
BITFONTS.RC 676 280 deflated
CENTER.WPM 155 115 deflated
CHANGER.DOC 14770 5354 deflated
CHANGER.EXE 21312 9186 deflated
CHASRC.ZIP 21779 20406 deflated
LENGT2.BAT 284 187 deflated
NEWOBJ.FRG 1119 491 deflated
NEWOBJBY.PAS 3734 965 deflated
NEWOBJBY.TPU 1008 448 deflated
NEWOBJTS.EXE 4128 2885 deflated
NEWOBJTS.PAS 1185 462 deflated
NTWIN32.MAK 5897 1467 deflated
PROCMON 643 294 deflated
PROCMON.C 31627 7972 deflated
PROCMON.EXE 22016 7439 deflated
PROCMON.H 2336 821 deflated
PROCMON.ICO 766 159 deflated
PROCMON.RC 720 407 deflated
SEEGRF.WK1 1884 470 deflated

Download File V12N02.ZIP Here

Contents of the CHANGER.DOC file


CHANGER.EXE (VERSION 1.0) Copyright (c) 1992 by Douglas Boling
-------------------------------------------------------------------------
First Published in PC Magazine January 26, 1993 (Utilities)
-------------------------------------------------------------------------

CHANGER:

CHANGER lets you give your Windows 3.1 desktop a different look
every time you bring it up. It lets you choose from among the various
wallpapers, color schemes, desktop patterns, and screen savers Windows
provides (or that you may have added), and you can limit CHANGER's choices
in each of the four categories. If you like only the ``Flying Windows''
and ``Rockets'' screen savers, you can tell CHANGER to select between
those two only. Indeed, if you don't use a wallpaper or desktop pattern
at all, you can tell CHANGER to ignore those (or any) particular categories.

You can also configure CHANGER to present your chosen selections
in sequence. If you want to use a specific color scheme for each day of
the week, simply choose your five favorite combinations (seven if you're
self-employed) and select CHANGER's sequential change option. If you'd
rather take your chances, you can have CHANGER make any or all of its
category choices at random.

Because CHANGER uses some of the function calls that are new in
Windows 3.1, a dialog box indicating that a newer version of Windows
is required will pop up if you try to run the utility under Windows 3.0.

To recompile the program after making changes of your own, you'll
need either the Borland C++ 3.1 compiler or Microsoft C 6.0 compiler and
the Windows SDK.

USING CHANGER

It takes only a few minutes to install and configure CHANGER;
thereafter it will run automatically. To install the utility, open the
Startup Group in your Program Manager. Select the File New menu item
and then choose Program Item. As the Description, fill in the title of
the program as you want it to appear under the icon. Then, on the
command line, enter the complete path and executable filename, followed
by /C. The /C command line switch tells CHANGER to change the desktop
per your configuration instructions and then terminate.

Thus, if you keep CHANGER in your PCMAG directory on your C: drive,
you would enter

C:\PCMAG\CHANGER /C

on the command line.

To configure CHANGER, just run CHANGER using the File Run menu
selection in the Program Manager, but without the /C switch. When you
start CHANGER without the /C parameter, it displays a dialog box with 4
choices: Colors, Wallpaper, Screen Saver, and Desktop Pattern.

To select a category, just double-click on its icon or select
Configure. Keyboard users can use hotkeys (Ctrl-C for Colors, Ctrl-W for
Wallpaper, Ctrl-S for Screen Savers, Ctrl-P for Patterns) instead.
(If you make frequent changes to your CHANGER configuration, you might
want to add a CHANGER Icon to the Program Manager that omits the /C on
the command line. This will allow you quick access to the CHANGER
configuration dialog.)

When you select a category, CHANGER brings up a dialog box with two
list boxes and a number of buttons. The first list box contains all
possible selections for that category. The second list box (initially
empty) contains the set of selections from which you want CHANGER to
pick. The Add, Rem (Remove), Add All, and Rem All (Remove All) buttons
let you move selections back and forth between the list boxes.

For example, when configuring the Colors category, CHANGER presents
a list that contains both the color combinations predefined by Windows
and those you may have created. To add a given color scheme to the list
of active selections, just select that scheme in the list box and click
on the Add button. (If you like shortcuts, double-clicking on an item
will add it to the active list.)

CHANGER will remove that combination from the Possible list and
place it in the Active list. To remove a color scheme from the Active
list, double-click on the item or select that item and press the Rem
button. The Add All and Rem All buttons give you a quick way to move
all selections between the list boxes.

Below the Possible and Active list boxes, the Configure dialog box
contains three radio buttons. The Random Change button tells CHANGER
to select an item at random from the Active list each time you start
Windows. Selecting Sequential Change tells CHANGER to select an item
sequentially from the Active list each time you start Windows. The No
Change button tells CHANGER not to change that particular category.
After you specify your configuration, click on the OK button to save
your changes; the Cancel button tells CHANGER to ignore your changes.

EXPLORING THE WINDOWS DESKTOP

How does Windows know which color pattern, wallpaper, and screen
saver to use when it starts? WIN.INI and SYSTEM.INI, the most important
of the .INI files, store a variety of settings for such things as the
position of windows, the type of video driver to load, and--you guessed
it--the colors settings, wall paper, and screen saver used by Windows.

The .INI files are organized into sections whose names are enclosed
in square brackets. Within each section there are usually several keys
(key words), each of which is set equal to a value. For example, the
WIN.INI file has a section called [Desktop] that includes Pattern,
IconSpacing, and Wallpaper keys. The Figure below is a partial listing
of my own WIN.INI file, showing the [Desktop] and the [Colors] sections.

-------------------------------------------------------------------------
[Desktop]
Pattern=136 84 34 69 136 21 34 81
TileWallpaper=1
GridGranularity=0
IconSpacing=65
Wallpaper=SQUARES.BMP

[Colors]
Background=0 64 128
AppWorkspace=192 192 192
Window=192 192 192
WindowText=0 0 0
Menu=192 192 192
MenuText= 0 0 0
ActiveTitle=64 128 128
InactiveTitle=192 192 192
TitleText=255 255 255
ActiveBorder=128 0 0
Inactive Border=130 130 130

WindowFrame=0 0 0
Scrollbar=128 128 128
ButtonFace=192 192 192
ButtonShadow=128 128 128
ButtonText=0 0 0
GrayText=192 192 192
Hilight=0 0 0
HilightText=255 255 255
InactiveTitleText=0 0 0
ButtonHilight=255 255 255

Figure: A partial WIN.INI file, showing the [Desktop] and [Colors] sections
and the keys listed in both.
-----------------------------------------------------------------------

The [Colors] section specifies the color settings for every part of
Windows, from backgrounds to button text. The value for each key is a
set of three numbers, separated by spaces, that represent the Red, Blue,
and Green components that are combined to produce the color. On my system,
the color of the title bar for the active window is specified by the
following line:

ActiveTitle=64 128 128

In this line, 64 represents the value of the Red component, 128
is the value of the Green component, and the final number, 128, is the
value of the Blue component. The amounts of each component may range
from 0 to 255, with 0 indicating that none of that color is added and
255 meaning that the maximum amount of that primary color is added.

If you're used to thinking in artistic terms, calling Red, Green,
and Blue ``primary colors'' may come as a surprise. When using paints
or pigments, the three primary colors are Red, Blue, and Yellow. The
explanation is that paints absorb the different wavelengths of light
while the rays that come from the sun or that illuminate a computer
monitor are light, whose red, green, and blue components, added together
in maximum amounts, produce white. Other combinations of the three
primaries produce other colors: red and green make yellow, blue and
green produce cyan, and so on.

If you look at the individual colors specified in the WIN.INI file,
however, something seems to be missing. When you use the Control Panel
to change your desktop color scheme you see names, such as Arizona,
Pastel, or--strangely enough--Hotdog Stand. Each of these represents
a numeric color combination. Selecting Pastel, for instance, changes
the entire desktop into a rainbow of subdued blues, greens, and yellows.

The translation table between the names and numbers is contained
in the [Color Schemes] section of the CONTROL.INI file. Here, each of
the color combinations consists of a series of 21 numbers that represent
all of the individual color settings used by Windows. Unlike the color
values listed in the WIN.INI file, however, these numbers are in
hexadecimal (base 16) format and are separated by commas. For example,
the Pastel key in my CONTROL.INI file is


Pastel=C0FF82,80FFFF,FFFFFF,0,
FFFFFF,0,FFFF80,FFFFFF,0,C080FF,
FFFFFF,808080,C0C0C0,C0C0C0,
808080,0,C0C0C0,FFFF00,0,0,FFFFFF

Each of these hexadecimal numbers represents the setting for a
particular color. The first number is the Background color, the second
is the Application Workspace color, and so on. When you select the
Pastel setting from the Control Panel, Windows takes the colors listed
and translates them into the color settings in the WIN.INI file.
For example, the starting number C0FF82 would be broken into three
hexadecimal numbers--C0 FF 82--which translate into the decimal values
192 255 130, which are then used to set the Background color. In the
WIN.INI file the line would read


Background=130 255 192


The Desktop Pattern is the little design that Windows uses when it
draws the desktop window. To get an idea of the different desktop
patterns, open the Desktop Control Panel applet, select (none) for the
Wallpaper, choose one of the many patterns listed, and click OK. You'll
see the selected pattern tiled across your Windows desktop. You can then
check out the different available patterns, or you can even make one of
your own by clicking on the Edit Pattern button. Unfortunately, the
original way if you tile your wallpaper, as I do, you'll only see the
desktop pattern as the background of the icon text on the bottom of the
screen.

The pattern is actually a bitmap that Windows creates from a series
of numbers. The numbers represent an 8- by 8-pixel bitmap that tells
Windows to use either the Background color (a 0-bit in the pattern) or
the WindowText color (a 1-bit in the pattern) for each specific pixel.
The pattern is repeated across the entire screen to draw the desktop.

An example may make this clearer. One of the available patterns,
called Tulip, is represented by the numbers 0 0 84 124 124 56 146 124.
Each of these numbers represents one 8-bit line in the bitmap. If you
write each of the numbers on a separate line and in binary, the tulip
pattern formed by the 1 bits will become evident, as shown in the Figure
below.

OOOOOOOO
OOOOOOOO
O1O1O1OO
O11111OO
O11111OO
OO111OOO
1OO1OO1O
O11111OO

As with the window colors, the current pattern is specified by the
eight numbers assigned to the Pattern key in the [Desktop] section of
the partial WIN.INI file listing above. As with the color combinations,
the names of the possible patterns (Tulip, Weave, Boxes, and so on) are
listed in the CONTROL.INI file, together with their 8-number values.
If you use the Control Panel to create your own pattern, its key and
values will also be written into the [Patterns] section of CONTROL.INI.
If you don't specify a pattern, the string will be assigned to the
Pattern key.

Wallpaper is a bitmap picture that Windows uses to cover the desktop.
The picture can be centered in the desktop or it can be ``tiled,'' by
repeating the bitmap so that it covers the entire screen.
(To tile a 64- by 64-pixel bitmap on a 1,024-by-768 screen, Windows must
repeat the bitmap 192 times.) Unlike the bitmap used to make the Desktop
pattern, the wallpaper picture is stored as a bitmap (.BMP) file and can
be in color.

Instead of specifying numbers, as with the Colors and Pattern
settings, the Wallpaper key in the [Desktop] section of WIN.INI contains
the filename of the bitmap to be used for the wallpaper. Also unlike the
Colors and the Pattern, the names of other possible Wallpaper bitmaps are
not stored in the CONTROL.INI file. Instead, the Control Panel lists all
the .BMP files in the Windows and Windows System directories as possible
wallpaper files. Thus, when you select a wallpaper bitmap, Windows simply
sets the Wallpaper key in [Desktop] to the name of the bitmap file.

The Windows Screen Saver was one of the new features added to
Windows 3.1. In reality, Microsoft simply bundled the screen-saver
application from the old Multimedia Windows, moving its setup from the
screen-saver applet in the Control Panel to the Desktop applet. Once
set, Windows automatically starts the screen saver after a predetermined
period of machine inactivity.

Screen savers are not bitmaps, but program files. The selected
screen saver is specified in the [Boot] section of the SYSTEM.INI file,
as the value for the SCRNSAVE.EXE key. Although the Screen Saver line
can include a path to another directory, screen savers are normally kept
in the Windows directory, the Windows System directory, or the directory
of the Control Panel application, since these are the only places the
Control Panel knows to look for them.

At the same time that the Control Panel stores the screen-saver
filename and path in SYSTEM.INI, two lines in the WIN.INI file are also
modified. The ScreenSaveTimeOut and ScreenSaveActive keys in the
[Windows] section of WIN.INI are updated to indicate that a screen saver
is active and the time to elapse before it becomes active.

If you look at the list of screen savers presented by the Control
Panel's Desktop applet, you won't see a list of the usual eight-character
filenames. Instead, you'll see descriptive screen-saver designations
that include upper- and lowercase characters and even spaces. This is
because the Desktop applet doesn't use the filename of the screen saver;
rather, it reads the description line imbedded inside the screen-saver
program to get the name of the screen saver. This enables Windows to
present you with nice descriptive names from which to choose while
storing the actual filename of your choice in the SYSTEM.INI file.
------------------------------------------------------------------------
DOUGLAS BOLING IS A CONTRIBUTING EDITOR TO PC MAGAZINE.


 December 5, 2017  Add comments

Leave a Reply