> Where can i find values of that standard UI 16 colors?

You can find these with UIColorGetTableEntryIndex.  Look in the 
documentation, it's straightforward.  However, the color indices used do not 
have to be the same on different devices, which is one big problem with 
changing the palette.


> h = DmGetResource('Tbmp', (int)bmpID);
> ErrFatalDisplayIf(h == NULL, "Missing Bitmap Resource!");
> bp = (BitmapPtr)MemHandleLock(h);
> int size = MemHandleSize (h)/sizeof(RGBColorType); ***bad***
> WinPalette(winPaletteSet, 0, size,(RGBColorType*)bp); ***bad***
> WinDrawBitmap(bp, x, y);
> MemHandleUnlock(h);
> DmReleaseResource(h);

I've never done this before (it's generally best to avoid color tables if 
possible), but
you need to access the color table of the bitmap instead of the bitmap.  The 
bitmap pointer is in h, so use BmpGetColortable to see if it has a color 
table and obtain a pointer to it.  Provide this pointer to the palette 
functions.

Hope this helps,
Tim Kostka 



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to