[comp.windows.ms] Win3.0 - Some quick questions

tomr@ashtate (Tom Rombouts) (06/13/90)

Attempting to save bandwidth, three questions in one posting:

1.  ToolBook .TBK file format.  Does anyone have info on this?  Their
tech support did not have a definitive answer.  Public?  Secret?
Future products waiting in the wings?

2.  Wallpaper (.BMP) limited to 16 colors. Is this correct?  Have
many 256 color GIF's.  Have converted to .PCX, but could not get
to 256 color .BMP display.  Someone told me this is a limitation of
current Windows drivers.  Is this correct?  (Used HIJAAK to convert)

3.  SDK sample TTY code.  Friend compiled this, had trouble with 
characters being lost.  Are there Windows serial I/O tricks that
this code does not use?  Other excellent sample serial I/0 C code
for windows floating around on BBS's, etc?

Tom Rombouts  Torrance Techie  Voice: (213) 538-7108

jmerrill@jarthur.Claremont.EDU (Confusion Reigns) (06/15/90)

In article <991@ashton.UUCP> tomr@ashton.UUCP (Tom Rombouts) writes:
>2.  Wallpaper (.BMP) limited to 16 colors. Is this correct?  Have
>many 256 color GIF's.  Have converted to .PCX, but could not get
>to 256 color .BMP display.  Someone told me this is a limitation of
>current Windows drivers.  Is this correct?  (Used HIJAAK to convert)

Wallpaper is NOT limited to 16 colors.  Paintbrush will load and save
monochrome (.MSP), 16-color, 256-color, and 24-bit images.  The problem is
your driver.  Hmm...does Windows come with a TARGA driver?  I didn't check.

--
Jason Merrill				jmerrill@jarthur.claremont.edu

bchin@wam.umd.edu (Weiyuan W. Chin) (06/15/90)

>In article <991@ashton.UUCP> tomr@ashton.UUCP (Tom Rombouts) writes:
>>2.  Wallpaper (.BMP) limited to 16 colors. Is this correct?  Have
>>many 256 color GIF's.  Have converted to .PCX, but could not get
>>to 256 color .BMP display.  Someone told me this is a limitation of
>>current Windows drivers.  Is this correct?  (Used HIJAAK to convert)

>Wallpaper is NOT limited to 16 colors.  Paintbrush will load and save
>monochrome (.MSP), 16-color, 256-color, and 24-bit images.  The problem is
>your driver.  Hmm...does Windows come with a TARGA driver?  I didn't check.

>--
>Jason Merrill				jmerrill@jarthur.claremont.edu

I've got an 8514/A (1024 * 768 * 256 colors) and was puzzled when
GCP 4.2 and the PC Labs Windows Benchmarks could not deal w/ more than
20 colors.  20 colors?  That's an odd number.  The WinBench software
came up with 8 bits/pixel, but only 20 colors.  Wierd.  So I RTFM - the
Windows 3.0 SDK Pallette Manager Chapter explained most of my questions.
Notice both GCP 4.2 and the Winbench are Win 2.xx apps.  

Windows 3.0 now has a Pallette Manager that juggles the colors that 
Windows 3.0 apps want.  There are twenty predefined and always present
system colors that every app has access to, hence Winbench said twenty
were available.  Therefore, a call to CreateSolidBrush or CreatePen
would return one of these twenty colors.  In order to access more, your
app has to create a logical pallette and stick the colors you want
in RGB format onto the logical pallette.  There are a bunch of new
messages and functions that handle switching pallettes (you can have more
than one logical pallette per app, but only one per DC - similar to most
other resources) in your app and between apps.

I know the SDK example SHOWDIB uses the pallette manager... however, 
the paintbrush that comes with Windows DOESN'T seem to.  I tried opening
a 256 color PCX file but it couldn't deal with colors.  It may have been
because of the file, I'm not sure.  Looks like a new giffer is going to
have to been written.   Guess what I'm going to be dealing w/ next? :-)  

A question for other beta developers:  the windows example that puts up
the current pallette (I can't remember the name right now) does come up
with 256 entries...  Now, does this mean there is a default pallette w/
256 colors?  Can I rely on the colors past twenty to always be there?
I haven't had a chance to read the source, so I'll be back.  The example
may initialize the pallette itself.

Hope this sheds some light,

--
Bill Chin
University of Maryland College Park
internet: bchin@is-next, bchin@cville