Gradient Static

Homepage: A Gradient Static Control

nRC := DllCall("AHKCtrlSupport\CreateGradientStatic", Str, "GradientStaticText", int, nStyle, int, x, int, y, int, width, int, height, int, nID, "Cdecl Int")
nRC NULL: error
<>NULL: ok
Str "GradientStaticText" Text which should be displayed on the control
Style See Windowstyles in the AHK-documentation
x, y top left coordinates on the dialog
Width, Height Width and Height of the control
ID Id of the new control


nRC := DllCall("AHKCtrlSupport\SetGradientStatic", int, nID, int, 0xFF0000, int, 0x00FF00, int, 0x0000cc, int, 1, "Cdecl Int")
nRC NULL: error
<>NULL: ok
nID ID of the control
BGR-color Starting color of the gradient
BGR-color Ending color of the gradient
BGR-color Textcolor
Textalign 0=left / 1 = center / 2 = right






Example:
; --------------- Gradient-Static --------------------------------
; ----------------------------------------------------------------
x = 275
y = 10
width = 200
height = 60
nID = 7
nStyle := 0x100 | 0x0000000D

nRC := DllCall("AHKCtrlSupport\CreateGradientStatic", Str, "GradientStaticText", int, nStyle, int, x, int, y, int, width, int, height, int, nID, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling CreateGradientStatic Errorlevel: %errorlevel% - RC: %nRC%
	return
}
; --------------- Gradient-Static COLOR ---------------------------
; HWND, nID, RGB of Textcolor, RGB of second color, RGB of Textcolor, Align (0-left,1-center,2-right)
nRC := DllCall("AHKCtrlSupport\SetGradientStatic", int, nID, int, 0xFF0000, int, 0x00FF00, int, 0x0000cc, int, 1, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling CreateGradientStatic Errorlevel: %errorlevel% - RC: %nRC%
	return
}