gdi+ slider is fertig
Spoiler anzeigen
Func _GDIPlus_CreateSlider($hGraphics, $x, $y, $wert, $color1, $color2, $maxwert = 100)
Opt("MouseCoordMode", 0)
Local $dll
$dll = DllStructCreate("int;int;int;int;int;int;int;int")
DllStructSetData($dll, 1, $x)
DllStructSetData($dll, 2, $y)
DllStructSetData($dll, 3, $wert)
DllStructSetData($dll, 4, $color1)
DllStructSetData($dll, 5, $color2)
DllStructSetData($dll, 6, $hGraphics)
DllStructSetData($dll, 8, $maxwert)
Return $dll
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func _GDIPlus_CheckSlider($dll)
Local $pos = MouseGetPos(), $userdll = DllOpen("user32.dll"), $dllread[8] = [DllStructGetData($dll, 1), DllStructGetData($dll, 2), DllStructGetData($dll, 3), DllStructGetData($dll, 4), DllStructGetData($dll, 5), DllStructGetData($dll, 6), DllStructGetData($dll, 7), DllStructGetData($dll, 8)]
Local $dllwrite, $penlines = _GDIPlus_PenCreate($dllread[3], 2), $penfill = _GDIPlus_BrushCreateSolid($dllread[4])
Local $points[6][2] = [[5,0], [$dllread[0]+$dllread[2]-5, $dllread[1]],[$dllread[0]+$dllread[2]-5, $dllread[1]+17],[$dllread[0]+$dllread[2], $dllread[1]+20],[$dllread[0]+$dllread[2]+5, $dllread[1]+17],[$dllread[0]+$dllread[2]+5, $dllread[1]]]
_GDIPlus_GraphicsDrawLine($dllread[5], $dllread[0], $dllread[1]+10, $dllread[0]+$dllread[7], $dllread[1]+10, $penlines)
$pos[1] -= 23
If _IsPressed("01", $userdll) Then
If ($pos[0] > $dllread[0]+$dllread[2]-5 and $pos[0] < $dllread[0]+$dllread[2]+5 and $pos[1] > $dllread[1] and $pos[1] < $dllread[1]+20) or $dllread[6] Then
DllStructSetData($dll, 7, "1")
$dllwrite = $pos[0]-$dllread[0]
If $pos[0] <= $dllread[0] Then $dllwrite = 0
If $pos[0] >= $dllread[0]+$dllread[7] Then $dllwrite = $dllread[7]
DllStructSetData($dll, 3, $dllwrite)
Else
DllStructSetData($dll, 7, "0")
EndIf
Else
DllStructSetData($dll, 7, "0")
EndIf
_GDIPlus_GraphicsFillPolygon($dllread[5], $points, $penfill)
_GDIPlus_GraphicsDrawPolygon($dllread[5], $points, $penlines)
EndFunc
Func _GDIPlus_ReadSlider($dll)
Return DllStructGetData($dll, 3)
EndFunc
ginge sicher kürzer aba fürs erste reichts