Posted by Otto Metschar on April 17, 2004 at 18:49:23:
In Reply to: Re: Video Mnemonic (Change Colors) posted by Brian Levantine on April 16, 2004 at 08:59:26:
Hi Brian, Before asking for help I had tried to change the colors of the controls using the following code from the program DIRECT.IBS with various values, and I could not get the colors that I wanted. Please explain which parts of the controls do the three color variables change and by adding the decimal values of three colors does that have the effect of mixing the colors and come up with a new color?
Sample Code:
!* cosForeColor = FORE.COLOR !=1 Foreground?
!* cosBackColor = BACK.COLOR !=2 Background?
!* cosGrayColor = GRAY.COLOR !=3 ??
!* cosForeColor = HEXDEC(CNTCFORG$) !*255 + (0 * 256) + (0 * 65536) !(Beige, Black, Black)
cosForeColor = 174 + (174 * 256) + (171 * 65536) !(Beige, Black, Black)
!* cosBackColor = HEXDEC(CNTCBACK$) !*174 + (206 * 256) + (171 * 65536) !(L.Blue,L.Red,M.Blue)
cosBackColor = 255 + (206 * 256) + (171 * 65536) !(L.Blue,L.Red,M.Blue)
!* cosGrayColor = HEXDEC(CNTCFILD$) !*128 + (128 * 256) + (128 * 65536) !(Purple,Purple,Purple)
cosGrayColor = 224 + (128 * 256) + (128 * 65536) !(Purple,Purple,Purple)
cosDlgFlags = cosDlgFlags + cosCTL.COSCOLOR + cosCTL.PARENTSPECIFIED
!*
RETURN