delphi – 将TColor转换为COLORREF

前端之家收集整理的这篇文章主要介绍了delphi – 将TColor转换为COLORREF前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
delphi有一个RTL函数将TColor转换为 COLORREF,如果不是我怎么能将TColor转换为COLORREF?

解决方法

检查 Graphics.ColorToRGB功能.

Converts a TColor value into an RGB
representation of the color.

Call ColorToRGB to obtain an RGB representation of a color for using with Windows API calls. ColorToRGB strips away the information that is stored in the highest order bits about which palette to use for colors that are not always available.

原文链接:https://www.f2er.com/delphi/101911.html

猜你在找的Delphi相关文章