harrow@exodus.dec.com (Jeff Harrow, NCSE BXB1-2/E02 DTN=293-5128) (06/19/87)
Copyright Jeffrey R. Harrow, 1987
Yesterday I posed the plaintiff question to the net of how I could get my
new Mac ][ to display normal uncolored windows, menus, etc. in COLOR,
instead of in black and white (I want to be reminded that all those $$s
were put to good use!).
While I had not yet received any response, I was sitting in front of this
magic box last night and figured that it was 'either it or me', and *I*
wanted to be the boss. So... I dragged out the APDA preliminary Inside
Mac Volume 5 documentation and decided that if I just modified the color
values contained in the 'wctb' (Window Color TaBle) resource, ID #0,
located in the System file, then windows which didn't explicitly have
their own color definitions would magically appear in MY choice of
colors.
If you use ResEdit to open this resource, you'll get the "General" editor
(hex and ASCII presentation, with no individual fields labeled, since
ResEdit 1.0.1 doesn't yet know about the 'wctb' resource). It was
quickly apparent what part of the resource did (the RGB records), but it
wasn't quite so clear what the beginning few words were for, and my
initial attempts at directly changing the assumed RGB record values DID
provide some color, but neither the colors nor on what parts of the
window I expected!
About 2 hours later, it became apparent that this preliminary information
was INCORRECT in its implied size of the first structure within the
'wctb' resource; a diagram implied that the CTseed was 8 bytes long,
while in reality it is but 4 bytes long! NOW, things began to work as
expected. COLOR WINDOWS! (Note, however, that just because I can add
color, it does NOT imply that it looks good! I can see that I have a lot
of experimentation to do before the result will really be 'pleasing'.)
(By the way, this is the third error I've found in not a lot of use of
this preliminary Volume 5; this is expected in preliminary
documentation, but be warned (but, Apple, DON'T hold up preliminary
versions; they're STILL necessary and extremely useful!)
However, it was less than intuitive to modify the color values by looking
at this hex dump, so I created a 'template' (TMPL) for ResEdit for the
'wctb' resource. Attached below is a short BINHEX file which, when
un-binhexed, will provide you with the TMPL resource.
To make use of this, make a COPY of ResEdit. Fire up ResEdit and OPEN
the un-binhexed file. In it, you'll see the TMPL resource. Select it,
and COPY it to the clipboard. Now, open the COPY of ResEdit, itself,
SELECT the TMPL resource toward the bottom of the list. PASTE, and this
new 'wctb' TMPL resource (ID # 21398) will appear in the list of TMPL
resources. QUIT ResEdit, saying YES when it asks if you want to save the
changes. You've now added the editing template to your copy of ResEdit.
To make use of this template and to give your Mac ][ default color
windows, fire up this MODIFIED copy of ResEdit and OPEN the System 4.1
that you intend to use on your Mac ][ (of course, ALWAYS have a backup,
unmodified copy around!). Toward the bottom of the list you'll see the
'wctb' resource group. Open it, and you'll see a specific 'wctb' with ID
# 0. Double-click on this, and you'll get a template that will allow you
to change values with ease. (If you would like to see what I started
with, select the 'wctb' ID # 0 and choose Open General from the File
menu, instead of just double-clicking on it.)
Don't modify the first 3 fields (marked Unused), nor the several PartCode
fields, but you CAN easily modify any of the 5 sets of RGB (Red, Green,
Blue) values (for the Window's Content Area, Frame, Text, Highlight, and
TitleBar). Remember that for any section of the window, a color (RGB) of
0000 in all three of the fields will yield BLACK (ie. NO color) while
all values of FFFF would yield WHITE (ALL color). You're probably
interested in some color in between. Remember that these are HEX values,
and if you delete the leading '$' ResEdit will beep at you to tell you
that you're entering an illegal value.
Note: what I'm providing is NOT a modified 'wctb' resource that will
automatically provide you with color windows, but a TEMPLATE so that you
can modify you own 'wctb' resource (already in the System 4.1 file) on
your own.
Have fun!
Jeff Harrow
Work address:
ARPAnet: HARROW%EXODUS.DEC@decwrl.ARPA
Usenet: decwrl!exodus.dec.com!harrow or
{allegra,Shasta,decvax}!decwrl!dec-rhea!dec-exodus!harrow
Easynet: EXODUS::HARROW
Telephone: (617)264-5128
USPS: Digital Equipment Corp.
Mail stop: BXB1-2/E02
85 Swanson Road
Boxboro, MA 01719
---------------------------- Cut Here-------------------------------------
(This file must be converted with BinHex 4.0)
:(RGMG')J9%e36#"dEb"`GA3JD@jdEb!J8Q9c4@4TG!#3%3+MD"%!N!3"!*!$!Q`
!!!&X!*!$0kJI)"pR"L"!)&!N%#!#T%b3!)*X*#B!2`'TQL"i!UBJ8!PhBh4L,P4
08%`#!*!,!3!!"!#i!*!1!3!!"!#i!*!5R2Yp,`#3"J+M!!!"T'!!!!T*6NP8!"m
!!dTi!SjU8M!A8d"Q6$!i!3J-3!!#Cd)J1!%)j)M3J#*!F!&)3#"!)$`!!!3!)JR
5J,+i!3aL)L)!S#iJ#35!!!%!!0'A*%Q9`8[U!C!!5'hrr+KZ)"r&6bm!)%q4q!-
LS#e19[k%51FH!(Mr,M`!!%!!B3#3!`&S%808Ff9PC#da)#KeER9cC@3T5%a14a"
$9&4bB@jc)#KeER9cC@3T5&G54!p$9(0THQ8J+(9ZGA0PC#P)9e*%#&"KFR4$Ef4
P5&G54!Y$EfjdC@jd,9*PC%KA8N3,3fpZG'9ZG#e(FQj)9e*%#d0[ER4PER3Y3Qa
e5&G54!K3BA*d3fpNC8KA8N3*4R*KE@8Y8Q9N5&G54!P'FQ&YC5e(FQj)9e*%#NC
bB@eP,8*XG@9)9e*%#&"KFR4$Ef4P5&G54!K8CAKd,9*PC%KA8N3+9'9iG#e(FQ9
PENKA8N3*9'9iG#e#E(9P5&G54!K3BA*d3fpNC8KA8N3+5'PXDA4P,9*PC%KA8N3
-5'PXDA4P,8GbC@9Z5&G54!Y)D@aTG'8Y3QaeC8KA8N3)8'&bG%0[C'9)9e*%$&4
TG'aPBQ&b,9*PC%KA8N3-9'PdE'9LBA)Y4h*Z5&G54!a8DA4XC@*KFLe#E(9)9e*
%!!!"!*!$!Q`!!!&X!*!$0`!#+BJ#P!#3!a`!-J!!9%e36!#3!`T6PJ#3"`)TM!4
hBh4L4R!: