Hilfe bei der GDIPlus Progressbar von Progandy

    • Offizieller Beitrag

    Hi.
    Ich habe das absolute Problem, das ich ein voller GDiPlus Legasteniker bin und eigentlich nicht weis, was sich über die AutoIt Versionen hinweg alles geändert hat.
    Progandys UDF läuft unter AutoIt 3.3.6.1 ohne Probleme, aber bei 3.3.8.1 und 3.3.12.0 wird nur Mist angezeigt.
    Kann mal ein GDIPlus-Könner über die UDF schauen und mir dabei helfen?
    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    So sieht das Ganze bei 3.3.6.1 aus:
    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    Und so bei 3.3.8.1 und 3.3.12.0 :
    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.


    Edit: Das kleinste Problem an der UDF ist das DLLCall($ghGDIPdll, "int",.... zu DLLCall($__g_hGDIPDll,........ wird, da scheint sich schon mal was am Konstantennamen geändert zu haben.

  • Was wird den für Mist angezeigt? Zumindest beim Beispiel in deiner Zip sehe ich jetzt nix was wirklich falsch läuft.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

    • Offizieller Beitrag

    @chip siehe die Bilder in meinem 1. Post.

    Aber das Ganze hat sich erledigt, habe die Lösung nach langem suchen im EN-Forum gefunden.
    http://www.autoitscript.com/forum/topic/13…ol/#entry955661


    Die Func _Gradient in der GDIpProgress war falsch.

    [autoit]

    ;-------------------------------------------------------------------
    #Region Gradient
    ;===============================================================================
    ;
    ; Function Name: _Gradient($RGB_Color1 ,$RGB_Color2, $Count)
    ; Description:: Returns an Array of Gradient Colors
    ; Parameter(s): $RGB_Color1 : The Start-Color in RGB Hexadecimal
    ; $RGB_Color2 : The End-Color in RGB Hexadecimal
    ; $Count : The number of Colors in the Gradient
    ; Requirement(s):
    ; Return Value(s): An Array with the Colors
    ; Author(s): Prog@ndy
    ;
    ;===============================================================================
    ;
    Func _Gradient($RGB_Color1, $RGB_Color2, $Count, $ARGB = False)
    Local $Color1_R, $Color1_G, $Color1_B, $Color2_R, $Color2_G, $Color2_B, $NeuCol_R, $NeuCol_G, $NeuCol_B
    $ARGB = StringLeft("FF", 2 * $ARGB)
    $Color1_R = BitAND(BitShift($RGB_Color1, 16), 0xff)
    $Color1_G = BitAND(BitShift($RGB_Color1, 8), 0xff)
    $Color1_B = BitAND($RGB_Color1, 0xff)
    $Color2_R = BitAND(BitShift($RGB_Color2, 16), 0xff)
    $Color2_G = BitAND(BitShift($RGB_Color2, 8), 0xff)
    $Color2_B = BitAND($RGB_Color2, 0xff)
    $Count -= 1 ; 0-basiert !
    Local $arColors[$Count + 1], $pos1
    For $i = 0 To $Count
    $pos1 = $Count - $i
    ;-------------------------
    $NeuCol_R = Int(($Color1_R * $pos1 + $Color2_R * $i) / ($Count))
    $NeuCol_G = Int(($Color1_G * $pos1 + $Color2_G * $i) / ($Count))
    $NeuCol_B = Int(($Color1_B * $pos1 + $Color2_B * $i) / ($Count))
    ;-------------------------
    $arColors[$i] = Execute('0x' & $ARGB & Hex($NeuCol_R, 2) & Hex($NeuCol_G, 2) & Hex($NeuCol_B, 2))
    Next
    Return $arColors
    EndFunc ;==>_Gradient

    [/autoit]


    Hier mal die geänderte Version der UDF, lauffähig ab 3.3.8.1