Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: The default colormap Message-ID: <8908141510.AA00863@expire.lcs.mit.edu> Date: 14 Aug 89 15:10:16 GMT References: <8908141502.AA06351@expo.lcs.mit.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 22 Is there a way to find out the the number of cells that are unused in the default colormap? No good way. (And for some visuals, you'd need more than one number.) But I thought the point of using the default map was to allow sharing between clients. It is. I assume that means that more than one program could use the same map Yes so that keeping track of the number of colors that your program used so far wouldn't be sufficient information. Right. You have to pay attention to errors in the allocation requests, and react appropriately. One method is to allocate out of the default map until some allocation fails, then use CopyColormapAndFree to move your existing allocations into a new map and continue with the remaining allocations.