FooButton

Homepage: FooButton

FooBtnHwnd := DllCall("AHKCtrlSupport\CreateFooBtn", Str, "BtnText", int, dwexStyle, int, 10, int, 500, int, 100, int, 30, int, HWND, int, nID, "Cdecl Int")
FooBtnHwnd Handle to the new control
String Text to display on the button
nStyle i.e. 0x10000000
x, y top left coordinates on the dialog
Width, Height Width and Height of the control
HWND Handle of the dialog
ID Id of the new control



nRC := DllCall("AHKCtrlSupport\AdjustFooBtnGradient", int, FooBtnHwnd, int, 0x0000ff, int, 0x0044ff, int, 0xff0000, int, 0xff4400, "Cdecl Int")
FooBtnHwnd Handle to the control
BGR-Color Top color of the gradient
BGR-Color Top color of the highlighted gradient
BGR-Color Bottom color of the gradient
BGR-Color Bottom color of the highlighted gradient
int 0 = turn gradient style off; 1 = turn gradient style on



nRC := DllCall("AHKCtrlSupport\AdjustFooBtnStyle", int, FooBtnHwnd, int, nType, int, nTextStyle, int, 0xff0000, int, 0xff4400, "Cdecl Int")
FooBtnHwnd Handle to the control
int nType 0 = static button
1 = push button
2 = hot push button
3 = push button DropDown (not supported yet)
4 = hotpush button DropDown (not supported yet)
5 = pushButtonMulti (not supported yet)
6 = hotPushButtonMulti (not supported yet)
7 = checkButton
8 = hotCheckButton
9 = checkBox
10 = radio
11 = hyperlink
int nTextStyle 0 = none
1 = single line
2 = single line center
3 = multiline
BGR-TextColor color of the text
int Bitmap-ID ID of the bitmap of the resource.dll. Optional parameter



Example:
dwexStyle := 0x40000000 | 0x10000000 | 0x00010000 | 0x0000000B | 0x00004000
nID = 114
FooBtnHwnd := DllCall("AHKCtrlSupport\CreateFooBtn", Str, "BtnText", int, dwexStyle, int, 120, int, 450, int, 100, int, 30, int, HWND, int, nID, "Cdecl Int")
if (errorlevel <> 0) || (FooBtnHwnd = 0)
{
	MsgBox error while calling CreateFooBtn Errorlevel: %errorlevel% - RC: %FooBtnHwnd%
	return
}

nRC := DllCall("AHKCtrlSupport\AdjustFooBtnGradient", int, FooBtnHwnd, int, 0x0000ff, int, 0x2200FF, int, 0x00eeff, int, 0x2244aa, int, 1, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling AdjustFooBtnGradient Errorlevel: %errorlevel% - RC: %nRC%
	return
}
nRC := DllCall("AHKCtrlSupport\AdjustFooBtnStyle", int, FooBtnHwnd, int, 2, int, 2, int, 0xFF3344, int, 125, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling AdjustFooBtnGradient Errorlevel: %errorlevel% - RC: %nRC%
	return
}