From: strobl@gmd.de (Wolfgang Strobl)
Subject: Re: Macintosh bigots
Organization: GMD, Sankt Augustin, Germany
Date: Thu, 19 Nov 1992 14:29:01 GMT

In <xly150p@rpi.edu> johnsd2@jec316.its.rpi.edu.its1 (Daniel Norman Johnson) writes:

>In article 722125075@gmd.de, strobl@gmd.de (Wolfgang Strobl) writes:
>>In <s0x191c@rpi.edu> johnsd2@jec326.its.rpi.edu.its1 (Daniel Norman Johnson) writes:
>>
>[deletia- lots of >s]
>>
>>>Hmm, thats 2 votes for 8 bit and 1 for 24 bit now, I think. :)
>>
>>Most of these cards have 1MByte video memory, so for 1024x768
>>its 8 bit deep, probably. For smaller resolution, it may be
>>more.

>Right. Same for the Mac. Gotta question now tho- how does
>a Windows card/driver/etc know what the "right" resolution is?
>(after all, you wouldn't want 640x480 on a 21 inch monitor most of the
>time, no?)

It doesn't know it, plain and simple. But people don't normally
use 640x480 on a 21 inch monitor. The drivers for the cheap cards
usually make assumptions about the resolution measured in dpi,
which are about right. Don't know about the more expensive 
solutions. Often, a big screen, a video card and the driver are
sold as a package, so I would expect that the driver knows the
exact resolution, there. But that's only guesswork.

[...]



>[deletia- resedit]
>>>
>>>>Modifying resources can be done using the standard file system
>>>>interface. Just read that part of a program file, which contains
>>>>the resources and interpret it yourself.
>>
>>>But you need to interpret the format..
>>
>>True. Just like a compiler has to do it.

>Doesn't the linker do that?

No, on Windows the resource compiler does it. I.e. it generates
that format, and attaches the output to the executable, in
two separate steps. On Windows/NT, the linker implements the
second step, i.e. the attaching.

>>>>On the macintosh, a single implementation concept (resources)
>>>>is used for three different purposes: to contain the programs
>>>>code, to contain the user interface part (i.e. dialog templates),
>>>>and for program parametrization. 
>>
>>>Its used for a lot more than that. Virtually anything you
>>>want can be stored there. Its very handy. Things like
>>>control definitions, color tables, all the strings in your
>>>program (officialy, you are supposed to do that), any internal
>>>data you want to keep there.
>>
>>There is a string table in the collection of the standard
>>Windows resource components, too, and its use is recommended,
>>likewise. It's of course part of the user interface.

>Hmm? All strings are in the ui? Anyway, the point was just that
>you can (and do) put all sorts of rediculous things in there,
>just cuz it easier.

The strings are ui business. The main purpose of the string
table is not to have any language dependency in the code, so that
you can translate your application into a foreign language
just by translating the resource script, and without looking
at the source code. A well written app not even has to be
recompiled to create a foreign version.

But this string table should'nt be modified at runtime or (mis-)
used for other purposes, IMHO. 

Wolfgang Strobl
#include <std.disclaimer.hpp>
Newsgroups: comp.os.ms-windows.advocacy