Pie Control

Homepage: Pie Chart Control

PieHWnd := DllCall("AHKCtrlSupport\CreatePieStatic", DWORD, nStyle, int, x, int, y, int, width, int, height, int, HWND, int, nID, "Cdecl Int")
PieHWnd Handle to the new control
Style See AHK documentation for static control styles
x, y top left coordinates on the dialog
Width, Height Width and Height of the control
HWND Handle to the parent window (AHK-Gui)
ID Id of the new control



nRC := DllCall("AHKCtrlSupport\SetPieStatic", DWORD, PieHWnd, str, szText, "Cdecl Int")
PieHWnd Handle to the Pie control
szText Text for the headline



nRC := DllCall("AHKCtrlSupport\ResetPieStatic", DWORD, PieHWnd, "Cdecl Int")
Clears all pieces
PieHWnd Handle to the Pie control



nRC := DllCall("AHKCtrlSupport\AddPieStatic", DWORD, PieHWnd, int, 0xeeeeee, int, 0x000000, int, PieCounter, str, "Text", "Cdecl Int")
PieHWnd Handle to the Pie control
BGR-Color Sets the background color
BGR-Color Sets the textcolor
PieCounter Add an angel (0-360)
"Text" Adds a text as description for the piece



Example:
nStyle = 0
x = 450
y = 80
width = 150
height = 150
nID = 109
PieHWnd := DllCall("AHKCtrlSupport\CreatePieStatic", DWORD, nStyle, int, x, int, y, int, width, int, height, int, HWND, int, nID, "Cdecl Int")
if (errorlevel <> 0) || (PieHWnd = 0)
{
	MsgBox error while calling CreatePieStatic Errorlevel: %errorlevel% - RC: %nRC%
	return
}
szText = Pie-Title
nRC := DllCall("AHKCtrlSupport\SetPieStatic", DWORD, PieHWnd, str, szText, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling SetPieStatic Errorlevel: %errorlevel% - RC: %nRC%
	return
}
PieCounter += 1
nRC := DllCall("AHKCtrlSupport\ResetPieStatic", DWORD, PieHWnd, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling ResetPieStatic Errorlevel: %errorlevel% - RC: %nRC%
	return
}
nRC := DllCall("AHKCtrlSupport\AddPieStatic", DWORD, PieHWnd, int, 0xeeeeee, int, 0x000000, int, PieCounter, str, "Text", "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
	MsgBox error while calling AddPieStatic Errorlevel: %errorlevel% - RC: %nRC%
	return
}