I simply want to change the color of a label to Red.
First, can you really do that? Palm OS controls don't have separate color settings, and changing the UI Color entries affects all controls on the form. You might need to manually draw the label yourself using WinDrawChars.
think I'm supposed to use a function like WinSetTextColor() or WinSetForeColor() or WinSetTextColorRGB(), but I don't understand how to get the value of the IndexedColorType that I want to pass to those methods.
You can use WinSetTextColorRGB and have the OS figure out the right color (the index value will be ignored), or you can call WinRGBToIndex first to determine what index value you should have and use that for WinSetTextColor.
The index field really serves two purposes:
1) it pads out the size of RGBColorType to four bytes, making it properly aligned all the time.
2) it's used in a color lookup table to map specific RGB values to color indices in the current color system.
I'm also somewhat confused on the index of the RGBColorType structure. I figure if I just want plain red, I can simply create an RBGColorType, set the blue and green to 0, the red to 200 or so, but then what should the index be?
Just leave it as 0 unless you're in a CLUT situation.
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
