December 17th, 1999, 06:50 AM
I am programming an application that needs a palette filled with shades of red.
I have tried the following lines of code :
For i = 0 To 255
Pal.palPalEntry(i).peRed = i
Pal.palPalEntry(i).peGreen = 0
Pal.palPalEntry(i).peBlue = 0
Pal.palPalEntry(i).peFlags = 0
Next i
hPal = CreatePalette(Pal)
hHoldPrevPal = SelectPalette(Form1.hdc, hPal, True)
RealizePalette (Form1.hdc)
RealizePalette has returned a value of 249.
While trying all shades of red, from RGB(0,0,0) to RGB(255,0,0) , I could get only 4 distinct shades of red,
with all the others dithered.
Thanks for any help,
Gino.
I have tried the following lines of code :
For i = 0 To 255
Pal.palPalEntry(i).peRed = i
Pal.palPalEntry(i).peGreen = 0
Pal.palPalEntry(i).peBlue = 0
Pal.palPalEntry(i).peFlags = 0
Next i
hPal = CreatePalette(Pal)
hHoldPrevPal = SelectPalette(Form1.hdc, hPal, True)
RealizePalette (Form1.hdc)
RealizePalette has returned a value of 249.
While trying all shades of red, from RGB(0,0,0) to RGB(255,0,0) , I could get only 4 distinct shades of red,
with all the others dithered.
Thanks for any help,
Gino.