Monir-SCS wrote:
Have a look at the ColorToRGB() function from the Graphics unit.

This one works only with system color, right?

If you pass is a system color, like clBtnFace or clWindow, then it will return the actual color. If you pass it a normal color, like clRed or clGreen, then it will return the original color. As I recall, ColorToRGB will not work on palette colors (in part because the function doesn't know what palette you're using).


If you have a TColor value, and you need to use it as a TColorRef, then always use the ColorToRGB function. Nothing in the Windows API uses TColor. The GetRValue, GetBValue, and GetGValue functions are part of the API.

--
Rob

__________________________________________________
Delphi-Talk mailing list -> [EMAIL PROTECTED]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to