From: barnettj@pookie.crd.ge.com (Janet A Barnett)
Subject: Re: Help. BadMatch making 24bit win on 8bit server !!
Nntp-Posting-Host: pookie.crd.ge.com
Organization: GE Corp. Research & Development, Schenectady, NY
Lines: 28

In article <1993Apr30.120234.15637@cci.dk> hwn@cci.dk (Henrik W. Nielsen) writes:
>
>
>I'm trying to make a 24 bit window using XCreateWindow on a 8 bit
>PseudoColor server. As far as I know this should be possible if you
[stuff deleted]
>   Xio.GSwin = XCreateWindow(Xio.DspPtr, RootWindow(Xio.DspPtr, Xio.Scr),
>			     x, y, w, h, 0, 24, InputOutput,
>			     Xtern.ColorInfo, 0, &SetWinAttrib);
>}
>
>
>This results in a BadMatch error. Can anyone please tell me why ?
>
>

The colormap element of SetWinAttrib must be a legitimate TrueColor
colormap. So, use XCreateColormap() with the proper visual and use it
in SetWinAttrib (and don't forget the mask!).

And the inevitable caveat: I usually use widgets, setting the visual
and colormap resources rather than direct X routines, so I could be
wrong. But, I think this is the general difficulty.

Allen Barnett
(whose wife graciously allowed to use her account)


