Board index » delphi » Getting Gradient caption Color

Getting Gradient caption Color

Windows 98 introduced gradient title bars, however in delphi we only have
access to the first color of the title bar, clActiveCaption.  Is there
anyway to get the second color so that I can correctly reproduce the title
bar gradients?

Thanks,
Steven

 

Re:Getting Gradient caption Color


Hi, Steven.

Use the GetSysColor() API call with the following:

COLOR_GRADIENTACTIVECAPTION

Windows NT 5.0 and Windows 98: Right side color in the color gradient of
an active window's title bar. COLOR_ACTIVECAPTION specifies the left
side color. Use SPI_GETGRADIENTCAPTIONS with the SystemParametersInfo
function to determine whether the gradient effect is enabled.

COLOR_GRADIENTINACTIVECAPTION

Windows NT 5.0 and Windows 98: Right side color in the color gradient of
an inactive window's title bar. COLOR_INACTIVECAPTION specifies the left
side color.  

I do not know what the literal values for these so, if they are not
defined in the library, maybe someone can provide the values.

Hope this helps.

robert

Quote
Steven Carr wrote:

> Windows 98 introduced gradient title bars, however in delphi we only have
> access to the first color of the title bar, clActiveCaption.  Is there
> anyway to get the second color so that I can correctly reproduce the title
> bar gradients?

> Thanks,
> Steven

Other Threads